ComposerUpdate

This commit is contained in:
Anyon 2019-11-28 10:56:36 +08:00
parent fef414759e
commit fdd2ca528b
5 changed files with 29 additions and 42 deletions

8
composer.lock generated
View File

@ -783,12 +783,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a77fd83917548d92d044a3481f01b102abbf1be9" "reference": "c65a66a1df421bd480f564378909ae9ef36c2191"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c65a66a1df421bd480f564378909ae9ef36c2191",
"reference": "a77fd83917548d92d044a3481f01b102abbf1be9", "reference": "c65a66a1df421bd480f564378909ae9ef36c2191",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -832,7 +832,7 @@
], ],
"description": "ThinkPHP v6.0 Development Library", "description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top", "homepage": "http://framework.thinkadmin.top",
"time": "2019-11-28T02:30:34+00:00" "time": "2019-11-28T02:43:48+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@ -805,12 +805,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "a77fd83917548d92d044a3481f01b102abbf1be9" "reference": "c65a66a1df421bd480f564378909ae9ef36c2191"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a77fd83917548d92d044a3481f01b102abbf1be9", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c65a66a1df421bd480f564378909ae9ef36c2191",
"reference": "a77fd83917548d92d044a3481f01b102abbf1be9", "reference": "c65a66a1df421bd480f564378909ae9ef36c2191",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -826,7 +826,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2019-11-28T02:30:34+00:00", "time": "2019-11-28T02:43:48+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2019-11-28 10:32:44 // This file is automatically generated at:2019-11-28 10:56:22
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -29,7 +29,7 @@ ThinkLibrary 6.0 是针对 ThinkPHP 6.0 版本封装的一套工具类库,方
部分代码来自互联网,若有异议可以联系作者进行删除。 部分代码来自互联网,若有异议可以联系作者进行删除。
* 在线体验地址https://demo.thinkadmin.top (账号和密码都是 admin * 在线体验地址https://v6.thinkadmin.top (账号和密码都是 admin
* Gitee仓库地址https://gitee.com/zoujingli/ThinkLibrary * Gitee仓库地址https://gitee.com/zoujingli/ThinkLibrary
* GitHub仓库地址https://github.com/zoujingli/ThinkLibrary * GitHub仓库地址https://github.com/zoujingli/ThinkLibrary
@ -129,7 +129,7 @@ $this->_page($dbQuery, $isPage, $isDisplay, $total);
$this->_query($dbQuery)->like('name,title')->equal('status')->page(); $this->_query($dbQuery)->like('name,title')->equal('status')->page();
// 对列表查询器进行二次处理 // 对列表查询器进行二次处理
$query = $this->_query($dbQuery)->like('name,title')->equal('status'); $query = $this->_query($dbQuery)->like('name, title')->equal('status');
$db = $query->db(); // @todo 这里可以对db进行操作 $db = $query->db(); // @todo 这里可以对db进行操作
$this->_page($db); // 显示列表分页 $this->_page($db); // 显示列表分页
``` ```
@ -149,43 +149,35 @@ $this->_deleted($dbQuery);
#### 禁用启用处理 #### 禁用启用处理
```php ```php
// 数据禁用处理 // 数据禁用处理
$this->_save($dbQuery,['status'=>'0']); $this->_save($dbQuery, ['status'=>'0']);
// 数据启用处理 // 数据启用处理
$this->_save($dbQuery,['status'=>'1']); $this->_save($dbQuery, ['status'=>'1']);
``` ```
#### 文件存储组件( oss 及 qiniu 需要配置参数) #### 文件存储组件( oss 及 qiniu 需要配置参数)
```php ```php
// 配置默认存储方式 // 配置默认存储方式
sysconf('storage_type','文件存储类型'); sysconf('storage.type','文件存储类型');
// OSS存储配置
sysconf('storage_oss_domain', '文件访问域名');
sysconf('storage_oss_keyid', '接口授权AppId');
sysconf('storage_oss_secret', '接口授权AppSecret');
sysconf('storage_oss_bucket', '文件存储空间名称');
sysconf('storage_oss_is_https', '文件HTTP访问协议');
sysconf('storage_oss_endpoint', '文件存储节点域名');
// 七牛云存储配置 // 七牛云存储配置
sysconf('storage_qiniu_region', '文件存储节点'); sysconf('storage.qiniu_region', '文件存储节点');
sysconf('storage_qiniu_domain', '文件访问域名'); sysconf('storage.qiniu_domain', '文件访问域名');
sysconf('storage_qiniu_bucket', '文件存储空间名称'); sysconf('storage.qiniu_bucket', '文件存储空间名称');
sysconf('storage_qiniu_is_https', '文件HTTP访问协议'); sysconf('storage.qiniu_is_https', '文件HTTP访问协议');
sysconf('storage_qiniu_access_key', '接口授权AccessKey'); sysconf('storage.qiniu_access_key', '接口授权AccessKey');
sysconf('storage_qiniu_secret_key', '接口授权SecretKey'); sysconf('storage.qiniu_secret_key', '接口授权SecretKey');
// 生成文件名称(链接url或文件md5) // 生成文件名称(链接url或文件md5)
$filename = \think\admin\Storage::name($url,$ext,$prv,$fun); $filename = \think\admin\Storage::name($url, $ext, $prv, $fun);
// 获取文件内容(自动存储方式) // 获取文件内容(自动存储方式)
$result = \think\admin\Storage::get($filename) $result = \think\admin\Storage::get($filename)
// 保存内容到文件(自动存储方式) // 保存内容到文件(自动存储方式)
boolean \think\admin\Storage::save($filename,$content); boolean \think\admin\Storage::save($filename, $content);
// 判断文件是否存在 // 判断文件是否存在
boolean \think\admin\Storage::has($filename); boolean \think\admin\Storage::has($filename);
@ -194,18 +186,15 @@ boolean \think\admin\Storage::has($filename);
$result = \think\admin\Storage::info($filename); $result = \think\admin\Storage::info($filename);
//指定存储类型(调用方法) //指定存储类型(调用方法)
boolean \think\admin\Storage::instance('local')->save($filename,$content); boolean \think\admin\Storage::instance('local')->save($filename, $content);
boolean \think\admin\Storage::instance('qiniu')->save($filename,$content); boolean \think\admin\Storage::instance('qiniu')->save($filename, $content);
$result = \think\admin\Storage::instance('oss')->get($filename);
$result = \think\admin\Storage::instance('local')->get($filename); $result = \think\admin\Storage::instance('local')->get($filename);
$result = \think\admin\Storage::instance('qiniu')->get($filename); $result = \think\admin\Storage::instance('qiniu')->get($filename);
boolean \think\admin\Storage::instance('oss')->has($filename);
boolean \think\admin\Storage::instance('local')->has($filename); boolean \think\admin\Storage::instance('local')->has($filename);
boolean \think\admin\Storage::instance('qiniu')->has($filename); boolean \think\admin\Storage::instance('qiniu')->has($filename);
$resutl = \think\admin\Storage::instance('oss')->info($filename);
$resutl = \think\admin\Storage::instance('local')->info($filename); $resutl = \think\admin\Storage::instance('local')->info($filename);
$resutl = \think\admin\Storage::instance('qiniu')->info($filename); $resutl = \think\admin\Storage::instance('qiniu')->info($filename);
``` ```
@ -213,24 +202,22 @@ $resutl = \think\admin\Storage::instance('qiniu')->info($filename);
#### 通用数据保存 #### 通用数据保存
```php ```php
// 指定关键列更新($where 为扩展条件) // 指定关键列更新($where 为扩展条件)
boolean data_save($dbQuery,$data,'pkname',$where); boolean data_save($dbQuery, $data, 'pkname', $where);
``` ```
#### 通用网络请求 #### 通用网络请求
```php ```php
// 发起get请求 // 发起get请求
$result = http_get($url,$query,$options); $result = http_get($url, $query, $options);
$result = \library\tools\Http::get($url,$query,$options);
// 发起post请求 // 发起post请求
$result = http_post($url,$data,$options); $result = http_post($url, $data, $options);
$result = \library\tools\Http::post($url,$data,$options);
``` ```
#### 系统参数配置(基于 system_config 数据表) #### 系统参数配置(基于 system_config 数据表)
```php ```php
// 设置参数 // 设置参数
sysconf($keyname,$keyvalue); sysconf($keyname, $keyvalue);
// 获取参数 // 获取参数
$keyvalue = sysconf($kename); $keyvalue = sysconf($kename);

View File

@ -22,7 +22,7 @@ use think\console\Input;
use think\console\Output; use think\console\Output;
/** /**
* 获取当前框架版本号 * 获取框架版本号
* Class Version * Class Version
* @package think\admin\command * @package think\admin\command
*/ */