mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
ed1cb2d2f4
commit
452462e7fd
@ -1,60 +1,53 @@
|
|||||||
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
|
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
|
||||||
<div class="layui-card-body padding-left-40">
|
<div class="layui-card-body padding-left-40">
|
||||||
|
|
||||||
<fieldset class="layui-form-item">
|
<fieldset class="layui-form-item layui-row layui-col-space10">
|
||||||
<legend class="layui-bg-gray padding-left-5 padding-right-5">账号信息</legend>
|
<div class="layui-col-xs2">
|
||||||
<div class="layui-row layui-col-space15">
|
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
|
||||||
<div class="layui-col-xs2">
|
<script>$('[name=headimg]').uploadOneImage()</script>
|
||||||
<input type="hidden" name="headimg" value="{$vo.headimg|default=''}">
|
|
||||||
<script>$('[name=headimg]').uploadOneImage()</script>
|
|
||||||
</div>
|
|
||||||
<label class="layui-col-xs5 relative block">
|
|
||||||
<span class="color-green font-w7">登录账号</span>
|
|
||||||
<span class="color-desc margin-left-5">Username</span>
|
|
||||||
{if isset($vo) and isset($vo.username)}
|
|
||||||
<input disabled value='{$vo.username|default=""}' class="layui-input layui-bg-gray">
|
|
||||||
{else}
|
|
||||||
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入4位及以上字符登录用户账号" class="layui-input">
|
|
||||||
{/if}
|
|
||||||
<span class="help-block">登录账号不能重复,账号创建后不允许再次修改</span>
|
|
||||||
</label>
|
|
||||||
<label class="layui-col-xs5 relative block">
|
|
||||||
<span class="color-green font-w7">用户昵称</span>
|
|
||||||
<span class="color-desc margin-left-5">Nickname</span>
|
|
||||||
<input name="nickname" value='{$vo.nickname|default=""}' placeholder="请输入用户的昵称" class="layui-input">
|
|
||||||
<span class="help-block">可选,用于显示账号名称,请尽量保持不要重复</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
<label class="layui-col-xs5 relative">
|
||||||
|
<span class="color-green font-w7">登录账号</span>
|
||||||
|
<span class="color-desc margin-left-5">Username</span>
|
||||||
|
{if isset($vo) and isset($vo.username)}
|
||||||
|
<input disabled value='{$vo.username|default=""}' class="layui-input layui-bg-gray">
|
||||||
|
{else}
|
||||||
|
<input name="username" value='{$vo.username|default=""}' required pattern="^.{4,}$" placeholder="请输入登录用户账号" class="layui-input">
|
||||||
|
{/if}
|
||||||
|
<span class="help-block">登录账号不能重复,账号创建后不能再次修改</span>
|
||||||
|
</label>
|
||||||
|
<label class="layui-col-xs5 relative">
|
||||||
|
<span class="color-green font-w7">用户昵称</span>
|
||||||
|
<span class="color-desc margin-left-5">Nickname</span>
|
||||||
|
<input name="nickname" value='{$vo.nickname|default=""}' placeholder="请输入用户的昵称" class="layui-input">
|
||||||
|
<span class="help-block">可选,用于显示账号名称,请尽量保持不要重复</span>
|
||||||
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="layui-bg-gray">
|
<fieldset class="layui-bg-gray layui-form-item layui-row layui-col-space10">
|
||||||
<fieldset class="layui-form-item">
|
<label class="layui-col-xs4 relative block">
|
||||||
<div class="layui-row layui-col-space15">
|
<span class="color-green font-w7">联系邮箱</span>
|
||||||
<label class="layui-col-xs4 relative block">
|
<span class="color-desc margin-left-5">Email</span>
|
||||||
<span class="color-green font-w7">联系手机</span>
|
<input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
|
||||||
<span class="color-desc margin-left-5">Mobile</span>
|
<span class="color-desc">可选,请填写常用的电子邮箱</span>
|
||||||
<input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
|
</label>
|
||||||
<span class="color-desc">可选,请填写常用的联系手机号</span>
|
<label class="layui-col-xs4 relative block">
|
||||||
</label>
|
<span class="color-green font-w7">联系手机</span>
|
||||||
<label class="layui-col-xs4 relative block">
|
<span class="color-desc margin-left-5">Mobile</span>
|
||||||
<span class="color-green font-w7">联系邮箱</span>
|
<input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入用户联系手机" class="layui-input">
|
||||||
<span class="color-desc margin-left-5">Email</span>
|
<span class="color-desc">可选,请填写常用的联系手机号</span>
|
||||||
<input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系电子邮箱" class="layui-input">
|
</label>
|
||||||
<span class="color-desc">可选,请填写常用的电子邮箱</span>
|
<label class="layui-col-xs4 relative block">
|
||||||
</label>
|
<span class="color-green font-w7">联系QQ</span>
|
||||||
<label class="layui-col-xs4 relative block">
|
<span class="color-desc margin-left-5">TencentQQ</span>
|
||||||
<span class="color-green font-w7">联系QQ</span>
|
<input name="contact_qq" autocomplete="off" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入联系QQ" class="layui-input">
|
||||||
<span class="color-desc margin-left-5">TencentQQ</span>
|
<span class="color-desc">可选,请填写常用的联系QQ号</span>
|
||||||
<input name="contact_qq" autocomplete="off" pattern="^\d{6,}$" value='{$vo.contact_qq|default=""}' placeholder="请输入联系QQ" class="layui-input">
|
</label>
|
||||||
<span class="color-desc">可选,请填写常用的联系QQ</span>
|
</fieldset>
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{notempty name='authorizes'}
|
{notempty name='authorizes'}
|
||||||
|
|
||||||
<div class="layui-form-item relative">
|
<div class="layui-form-item layui-col-space10">
|
||||||
<span class="color-green font-w7">访问授权</span>
|
<span class="color-green font-w7">访问授权</span>
|
||||||
<span class="color-desc margin-left-5">Authorize</span>
|
<span class="color-desc margin-left-5">Authorize</span>
|
||||||
<div class="layui-textarea">
|
<div class="layui-textarea">
|
||||||
@ -77,20 +70,19 @@
|
|||||||
</div>
|
</div>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
|
|
||||||
<label class="layui-form-item relative block">
|
<label class="layui-form-item layui-col-space10 block">
|
||||||
<span class="color-green font-w7">用户描述</span>
|
<span class="color-green font-w7">用户描述</span>
|
||||||
<span class="color-desc margin-left-5">Description</span>
|
<span class="color-desc margin-left-5">Description</span>
|
||||||
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
|
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
<div class="hr-line-dashed"></div>
|
||||||
|
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||||
|
|
||||||
<div class="hr-line-dashed"></div>
|
<div class="layui-form-item text-center">
|
||||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
<button class="layui-btn" type='submit'>保存数据</button>
|
||||||
|
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||||
<div class="layui-form-item text-center">
|
</div>
|
||||||
<button class="layui-btn" type='submit'>保存数据</button>
|
|
||||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
8
composer.lock
generated
8
composer.lock
generated
@ -909,12 +909,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "4834f87b32ed0fadf14864068614e9d2b20c9507"
|
"reference": "914e2daea5331fef86be45433b0d1d891a099685"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4834f87b32ed0fadf14864068614e9d2b20c9507",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/914e2daea5331fef86be45433b0d1d891a099685",
|
||||||
"reference": "4834f87b32ed0fadf14864068614e9d2b20c9507",
|
"reference": "914e2daea5331fef86be45433b0d1d891a099685",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -958,7 +958,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-12-31T02:35:41+00:00"
|
"time": "2020-01-02T02:10:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -935,12 +935,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "4834f87b32ed0fadf14864068614e9d2b20c9507"
|
"reference": "914e2daea5331fef86be45433b0d1d891a099685"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/4834f87b32ed0fadf14864068614e9d2b20c9507",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/914e2daea5331fef86be45433b0d1d891a099685",
|
||||||
"reference": "4834f87b32ed0fadf14864068614e9d2b20c9507",
|
"reference": "914e2daea5331fef86be45433b0d1d891a099685",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -956,7 +956,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2019-12-31T02:35:41+00:00",
|
"time": "2020-01-02T02:10:03+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2019-12-31 11:11:55
|
// This file is automatically generated at:2020-01-02 10:44:47
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
@ -73,9 +73,9 @@ class AliossStorage extends Storage
|
|||||||
$this->secretKey = sysconf('storage.alioss_secret_key');
|
$this->secretKey = sysconf('storage.alioss_secret_key');
|
||||||
// 计算链接前缀
|
// 计算链接前缀
|
||||||
$type = strtolower(sysconf('storage.alioss_http_protocol'));
|
$type = strtolower(sysconf('storage.alioss_http_protocol'));
|
||||||
if ($type === 'auto') $this->prefix = "//{$this->domain}/";
|
if ($type === 'auto') $this->prefix = "//{$this->domain}";
|
||||||
elseif ($type === 'http') $this->prefix = "http://{$this->domain}/";
|
elseif ($type === 'http') $this->prefix = "http://{$this->domain}";
|
||||||
elseif ($type === 'https') $this->prefix = "https://{$this->domain}/";
|
elseif ($type === 'https') $this->prefix = "https://{$this->domain}";
|
||||||
else throw new \think\Exception('未配置阿里云URL域名哦');
|
else throw new \think\Exception('未配置阿里云URL域名哦');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ class AliossStorage extends Storage
|
|||||||
public function del($name, $safe = false)
|
public function del($name, $safe = false)
|
||||||
{
|
{
|
||||||
$result = HttpExtend::request('DELETE', "http://{$this->bucket}.{$this->point}/{$name}", [
|
$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'));
|
return is_numeric(stripos($result, '204 No Content'));
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ class AliossStorage extends Storage
|
|||||||
public function has($name, $safe = false)
|
public function has($name, $safe = false)
|
||||||
{
|
{
|
||||||
$result = HttpExtend::request('HEAD', "http://{$this->bucket}.{$this->point}/{$name}", [
|
$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'));
|
return is_numeric(stripos($result, 'HTTP/1.1 200 OK'));
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ class AliossStorage extends Storage
|
|||||||
*/
|
*/
|
||||||
public function url($name, $safe = false)
|
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()
|
public function upload()
|
||||||
{
|
{
|
||||||
$protocol = $this->app->request->isSsl() ? 'https' : 'http';
|
$http = $this->app->request->isSsl() ? 'https' : 'http';
|
||||||
return "{$protocol}://{$this->bucket}.{$this->point}";
|
return "{$http}://{$this->bucket}.{$this->point}";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -230,7 +230,7 @@ class AliossStorage extends Storage
|
|||||||
* @param array $header 请求头信息
|
* @param array $header 请求头信息
|
||||||
* @return array
|
* @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['Date'])) $header['Date'] = gmdate('D, d M Y H:i:s \G\M\T');
|
||||||
if (empty($header['Content-Type'])) $header['Content-Type'] = 'application/xml';
|
if (empty($header['Content-Type'])) $header['Content-Type'] = 'application/xml';
|
||||||
|
@ -30,14 +30,14 @@ class LocalStorage extends Storage
|
|||||||
*/
|
*/
|
||||||
protected function initialize(): Storage
|
protected function initialize(): Storage
|
||||||
{
|
{
|
||||||
$this->prefix = rtrim($this->app->getRootPath(), '\\/');
|
$this->prefix = dirname($this->app->request->basefile(true));
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前实例对象
|
* 获取当前实例对象
|
||||||
* @param null $name
|
* @param null $name
|
||||||
* @return static
|
* @return LocalStorage
|
||||||
* @throws \think\Exception
|
* @throws \think\Exception
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
@ -115,8 +115,7 @@ class LocalStorage extends Storage
|
|||||||
public function url($name, $safe = false)
|
public function url($name, $safe = false)
|
||||||
{
|
{
|
||||||
if ($safe) return $name;
|
if ($safe) return $name;
|
||||||
$root = rtrim(dirname($this->app->request->basefile(true)), '\\/');
|
return "{$this->prefix}/upload/{$name}";
|
||||||
return "{$root}/upload/{$name}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -127,8 +126,9 @@ class LocalStorage extends Storage
|
|||||||
*/
|
*/
|
||||||
public function path($name, $safe = false)
|
public function path($name, $safe = false)
|
||||||
{
|
{
|
||||||
|
$root = $this->app->getRootPath();
|
||||||
$path = $safe ? 'safefile' : 'public/upload';
|
$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()
|
public function upload()
|
||||||
{
|
{
|
||||||
return url('@admin/api.upload/file', [], false, true)->build();
|
return url('@admin/api.upload/file')->build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -47,9 +47,9 @@ class QiniuStorage extends Storage
|
|||||||
$this->secretKey = sysconf('storage.qiniu_secret_key');
|
$this->secretKey = sysconf('storage.qiniu_secret_key');
|
||||||
// 计算链接前缀
|
// 计算链接前缀
|
||||||
$type = strtolower(sysconf('storage.qiniu_http_protocol'));
|
$type = strtolower(sysconf('storage.qiniu_http_protocol'));
|
||||||
if ($type === 'auto') $this->prefix = "//{$this->domain}/";
|
if ($type === 'auto') $this->prefix = "//{$this->domain}";
|
||||||
elseif ($type === 'http') $this->prefix = "http://{$this->domain}/";
|
elseif ($type === 'http') $this->prefix = "http://{$this->domain}";
|
||||||
elseif ($type === 'https') $this->prefix = "https://{$this->domain}/";
|
elseif ($type === 'https') $this->prefix = "https://{$this->domain}";
|
||||||
else throw new \think\Exception('未配置七牛云URL域名哦');
|
else throw new \think\Exception('未配置七牛云URL域名哦');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ class QiniuStorage extends Storage
|
|||||||
*/
|
*/
|
||||||
public function url($name, $safe = false)
|
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([
|
$policy = $this->safeBase64(json_encode([
|
||||||
"deadline" => time() + $expires, "scope" => is_null($name) ? $this->bucket : "{$this->bucket}:{$name}",
|
"deadline" => time() + $expires, "scope" => is_null($name) ? $this->bucket : "{$this->bucket}:{$name}",
|
||||||
'returnBody' => json_encode([
|
'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),
|
], JSON_UNESCAPED_UNICODE),
|
||||||
]));
|
]));
|
||||||
return "{$this->accessKey}:{$this->safeBase64(hash_hmac('sha1', $policy, $this->secretKey, true))}:{$policy}";
|
return "{$this->accessKey}:{$this->safeBase64(hash_hmac('sha1', $policy, $this->secretKey, true))}:{$policy}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user