提交 64326d17 authored 作者: chengye's avatar chengye

2020-2-7-1

...@@ -11,4 +11,5 @@ ...@@ -11,4 +11,5 @@
/LICENSE.txt /LICENSE.txt
/phpinfo.php /phpinfo.php
/README.md /README.md
/think /think
\ No newline at end of file /config/database.php
差异被折叠。
...@@ -59,11 +59,13 @@ class Invoice extends Base ...@@ -59,11 +59,13 @@ class Invoice extends Base
} }
$page =Request::param('page')?Request::param('page'):1; $page =Request::param('page')?Request::param('page'):1;
$limit = Request::param('limit')?Request::param('limit'):10; $limit = Request::param('limit')?Request::param('limit'):10;
$data = (new EmInvoice)->getInvoiceList($map,$page,$limit);
$emInvModel = new EmInvoice;
$data = $emInvModel->getInvoiceList($map,$page,$limit);
foreach ( $data as $key => &$v) { foreach ( $data as $key => &$v) {
$v['status']=parseStatus($v['status']); $v['status']=parseStatus($v['status']);
} }
$InvoiceCount = (new EmInvoice)->getInvoiceCount($map); $InvoiceCount = $emInvModel->getInvoiceCount($map);
if(Request::param('page')){ if(Request::param('page')){
return ['code'=>0,'msg'=>'','count'=>$InvoiceCount,'data'=>$data]; return ['code'=>0,'msg'=>'','count'=>$InvoiceCount,'data'=>$data];
} }
......
<?php <?php
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ] // | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com> // | Author: liu21st <liu21st@gmail.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | 缓存设置 // | 缓存设置
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
return [ return [
// 缓存配置为复合类型 // 缓存配置为复合类型
'type' => 'complex', 'type' => 'complex',
'default' => [ 'default' => [
'type' => 'file', 'type' => 'file',
// 全局缓存有效期(0为永久有效) // 全局缓存有效期(0为永久有效)
'expire'=> 0, 'expire'=> 0,
// 缓存前缀 // 缓存前缀
'prefix'=> '', 'prefix'=> '',
// 缓存目录 // 缓存目录
'path' => '', 'path' => '',
], ],
'redis' => [ 'redis' => [
'type' => 'redis', 'type' => 'redis',
'host' => '127.0.0.1', 'host' => '192.168.1.71',
// 全局缓存有效期(0为永久有效) // 全局缓存有效期(0为永久有效)
'expire'=> 0, 'expire'=> 0,
// 缓存前缀 // 缓存前缀
'prefix'=> '', 'prefix'=> '',
], ],
// 添加更多的缓存类型设置 // 添加更多的缓存类型设置
]; ];
...@@ -13,15 +13,15 @@ return [ ...@@ -13,15 +13,15 @@ return [
// 数据库类型 // 数据库类型
'type' => 'mysql', 'type' => 'mysql',
// 服务器地址 // 服务器地址
'hostname' => '127.0.0.1', 'hostname' => '192.168.1.71',
// 数据库名 // 数据库名
'database' => 'gonn', 'database' => 'gonn_release',
// 用户名 // 用户名
'username' => 'root', 'username' => 'root',
// 密码 // 密码
'password' => 'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX', 'password' => 'aLN%4Jx7ZsmsoMlOB0XEd7',
// 端口 // 端口
'hostport' => '10036', 'hostport' => '3306',
// 连接dsn // 连接dsn
'dsn' => '', 'dsn' => '',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论