+
+
+ {notempty name='vo.id'}
{/notempty}
-
- {notempty name='vo.id'}
{/notempty}
-
-
-
-
+
+
+
+
diff --git a/composer.lock b/composer.lock
index 24d285899..90a2b1758 100644
--- a/composer.lock
+++ b/composer.lock
@@ -909,12 +909,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
- "reference": "4834f87b32ed0fadf14864068614e9d2b20c9507"
+ "reference": "914e2daea5331fef86be45433b0d1d891a099685"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4834f87b32ed0fadf14864068614e9d2b20c9507",
- "reference": "4834f87b32ed0fadf14864068614e9d2b20c9507",
+ "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/914e2daea5331fef86be45433b0d1d891a099685",
+ "reference": "914e2daea5331fef86be45433b0d1d891a099685",
"shasum": "",
"mirrors": [
{
@@ -958,7 +958,7 @@
],
"description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top",
- "time": "2019-12-31T02:35:41+00:00"
+ "time": "2020-01-02T02:10:03+00:00"
},
{
"name": "zoujingli/wechat-developer",
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index b334a09db..498e3ed89 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -935,12 +935,12 @@
"source": {
"type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git",
- "reference": "4834f87b32ed0fadf14864068614e9d2b20c9507"
+ "reference": "914e2daea5331fef86be45433b0d1d891a099685"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4834f87b32ed0fadf14864068614e9d2b20c9507",
- "reference": "4834f87b32ed0fadf14864068614e9d2b20c9507",
+ "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/914e2daea5331fef86be45433b0d1d891a099685",
+ "reference": "914e2daea5331fef86be45433b0d1d891a099685",
"shasum": "",
"mirrors": [
{
@@ -956,7 +956,7 @@
"ext-json": "*",
"topthink/framework": "^6.0"
},
- "time": "2019-12-31T02:35:41+00:00",
+ "time": "2020-01-02T02:10:03+00:00",
"type": "library",
"extra": {
"think": {
diff --git a/vendor/services.php b/vendor/services.php
index b91db2ed9..cd6f10d8b 100644
--- a/vendor/services.php
+++ b/vendor/services.php
@@ -1,5 +1,5 @@
'think\\app\\Service',
diff --git a/vendor/zoujingli/think-library/src/storage/AliossStorage.php b/vendor/zoujingli/think-library/src/storage/AliossStorage.php
index 8b48e6fc7..c7394c923 100644
--- a/vendor/zoujingli/think-library/src/storage/AliossStorage.php
+++ b/vendor/zoujingli/think-library/src/storage/AliossStorage.php
@@ -73,9 +73,9 @@ class AliossStorage extends Storage
$this->secretKey = sysconf('storage.alioss_secret_key');
// 计算链接前缀
$type = strtolower(sysconf('storage.alioss_http_protocol'));
- if ($type === 'auto') $this->prefix = "//{$this->domain}/";
- elseif ($type === 'http') $this->prefix = "http://{$this->domain}/";
- elseif ($type === 'https') $this->prefix = "https://{$this->domain}/";
+ if ($type === 'auto') $this->prefix = "//{$this->domain}";
+ elseif ($type === 'http') $this->prefix = "http://{$this->domain}";
+ elseif ($type === 'https') $this->prefix = "https://{$this->domain}";
else throw new \think\Exception('未配置阿里云URL域名哦');
return $this;
}
@@ -137,7 +137,7 @@ class AliossStorage extends Storage
public function del($name, $safe = false)
{
$result = HttpExtend::request('DELETE', "http://{$this->bucket}.{$this->point}/{$name}", [
- 'returnHeader' => true, 'headers' => $this->_signHeader('DELETE', $name),
+ 'returnHeader' => true, 'headers' => $this->headerSign('DELETE', $name),
]);
return is_numeric(stripos($result, '204 No Content'));
}
@@ -151,7 +151,7 @@ class AliossStorage extends Storage
public function has($name, $safe = false)
{
$result = HttpExtend::request('HEAD', "http://{$this->bucket}.{$this->point}/{$name}", [
- 'returnHeader' => true, 'headers' => $this->_signHeader('HEAD', $name),
+ 'returnHeader' => true, 'headers' => $this->headerSign('HEAD', $name),
]);
return is_numeric(stripos($result, 'HTTP/1.1 200 OK'));
}
@@ -164,7 +164,7 @@ class AliossStorage extends Storage
*/
public function url($name, $safe = false)
{
- return $this->prefix . $name;
+ return "{$this->prefix}/{$name}";
}
/**
@@ -199,8 +199,8 @@ class AliossStorage extends Storage
*/
public function upload()
{
- $protocol = $this->app->request->isSsl() ? 'https' : 'http';
- return "{$protocol}://{$this->bucket}.{$this->point}";
+ $http = $this->app->request->isSsl() ? 'https' : 'http';
+ return "{$http}://{$this->bucket}.{$this->point}";
}
/**
@@ -230,7 +230,7 @@ class AliossStorage extends Storage
* @param array $header 请求头信息
* @return array
*/
- private function _signHeader($method, $soruce, $header = [])
+ private function headerSign($method, $soruce, $header = [])
{
if (empty($header['Date'])) $header['Date'] = gmdate('D, d M Y H:i:s \G\M\T');
if (empty($header['Content-Type'])) $header['Content-Type'] = 'application/xml';
diff --git a/vendor/zoujingli/think-library/src/storage/LocalStorage.php b/vendor/zoujingli/think-library/src/storage/LocalStorage.php
index 9f86a1a07..47ffacdb2 100644
--- a/vendor/zoujingli/think-library/src/storage/LocalStorage.php
+++ b/vendor/zoujingli/think-library/src/storage/LocalStorage.php
@@ -30,14 +30,14 @@ class LocalStorage extends Storage
*/
protected function initialize(): Storage
{
- $this->prefix = rtrim($this->app->getRootPath(), '\\/');
+ $this->prefix = dirname($this->app->request->basefile(true));
return $this;
}
/**
* 获取当前实例对象
* @param null $name
- * @return static
+ * @return LocalStorage
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
@@ -115,8 +115,7 @@ class LocalStorage extends Storage
public function url($name, $safe = false)
{
if ($safe) return $name;
- $root = rtrim(dirname($this->app->request->basefile(true)), '\\/');
- return "{$root}/upload/{$name}";
+ return "{$this->prefix}/upload/{$name}";
}
/**
@@ -127,8 +126,9 @@ class LocalStorage extends Storage
*/
public function path($name, $safe = false)
{
+ $root = $this->app->getRootPath();
$path = $safe ? 'safefile' : 'public/upload';
- return str_replace('\\', '/', "{$this->prefix}/{$path}/{$name}");
+ return strtr("{$root}{$path}/{$name}", '\\', '/');
}
/**
@@ -150,7 +150,7 @@ class LocalStorage extends Storage
*/
public function upload()
{
- return url('@admin/api.upload/file', [], false, true)->build();
+ return url('@admin/api.upload/file')->build();
}
}
\ No newline at end of file
diff --git a/vendor/zoujingli/think-library/src/storage/QiniuStorage.php b/vendor/zoujingli/think-library/src/storage/QiniuStorage.php
index 05cce036b..cd1d012b6 100644
--- a/vendor/zoujingli/think-library/src/storage/QiniuStorage.php
+++ b/vendor/zoujingli/think-library/src/storage/QiniuStorage.php
@@ -47,9 +47,9 @@ class QiniuStorage extends Storage
$this->secretKey = sysconf('storage.qiniu_secret_key');
// 计算链接前缀
$type = strtolower(sysconf('storage.qiniu_http_protocol'));
- if ($type === 'auto') $this->prefix = "//{$this->domain}/";
- elseif ($type === 'http') $this->prefix = "http://{$this->domain}/";
- elseif ($type === 'https') $this->prefix = "https://{$this->domain}/";
+ if ($type === 'auto') $this->prefix = "//{$this->domain}";
+ elseif ($type === 'http') $this->prefix = "http://{$this->domain}";
+ elseif ($type === 'https') $this->prefix = "https://{$this->domain}";
else throw new \think\Exception('未配置七牛云URL域名哦');
return $this;
}
@@ -136,7 +136,7 @@ class QiniuStorage extends Storage
*/
public function url($name, $safe = false)
{
- return "{$this->prefix}{$name}";
+ return "{$this->prefix}/{$name}";
}
/**
@@ -201,7 +201,7 @@ class QiniuStorage extends Storage
$policy = $this->safeBase64(json_encode([
"deadline" => time() + $expires, "scope" => is_null($name) ? $this->bucket : "{$this->bucket}:{$name}",
'returnBody' => json_encode([
- 'uploaded' => true, 'filename' => '$(key)', 'file' => $name, 'url' => "{$this->prefix}$(key)", 'key' => $name,
+ 'uploaded' => true, 'filename' => '$(key)', 'file' => $name, 'url' => "{$this->prefix}/$(key)", 'key' => $name,
], JSON_UNESCAPED_UNICODE),
]));
return "{$this->accessKey}:{$this->safeBase64(hash_hmac('sha1', $policy, $this->secretKey, true))}:{$policy}";