mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
693379509c
commit
689bc82dcf
@ -46,8 +46,9 @@ class Plugs extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
|
$dbname = $this->app->db->getConnection()->getConfig('database');
|
||||||
|
$this->app->console->call("optimize:schema", ["--db={$dbname}"]);
|
||||||
$this->app->console->call('optimize:route');
|
$this->app->console->call('optimize:route');
|
||||||
$this->app->console->call('optimize:schema');
|
|
||||||
$this->success('网站缓存加速成功!');
|
$this->success('网站缓存加速成功!');
|
||||||
} else {
|
} else {
|
||||||
$this->error('只有超级管理员才能操作!');
|
$this->error('只有超级管理员才能操作!');
|
||||||
@ -68,7 +69,8 @@ class Plugs extends Controller
|
|||||||
try {
|
try {
|
||||||
if (AdminService::instance()->isSuper()) {
|
if (AdminService::instance()->isSuper()) {
|
||||||
$data = SystemService::instance()->getRuntime();
|
$data = SystemService::instance()->getRuntime();
|
||||||
$this->app->console->call('clear');
|
$path = strtr("{$this->app->getRootPath()}runtime/", '\\', '/');
|
||||||
|
$this->app->console->call('clear', ["--path={$path}"]);
|
||||||
SystemService::instance()->setRuntime($data['app_map'], $data['app_run']);
|
SystemService::instance()->setRuntime($data['app_map'], $data['app_run']);
|
||||||
$this->success('清理网站缓存成功!');
|
$this->success('清理网站缓存成功!');
|
||||||
} else {
|
} else {
|
||||||
|
18
composer.lock
generated
18
composer.lock
generated
@ -223,16 +223,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "opis/closure",
|
"name": "opis/closure",
|
||||||
"version": "3.5.1",
|
"version": "3.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/opis/closure.git",
|
"url": "https://github.com/opis/closure.git",
|
||||||
"reference": "93ebc5712cdad8d5f489b500c59d122df2e53969"
|
"reference": "2e3299cea6f485ca64d19c540f46d7896c512ace"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969",
|
"url": "https://api.github.com/repos/opis/closure/zipball/2e3299cea6f485ca64d19c540f46d7896c512ace",
|
||||||
"reference": "93ebc5712cdad8d5f489b500c59d122df2e53969",
|
"reference": "2e3299cea6f485ca64d19c540f46d7896c512ace",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -286,7 +286,7 @@
|
|||||||
"serialization",
|
"serialization",
|
||||||
"serialize"
|
"serialize"
|
||||||
],
|
],
|
||||||
"time": "2019-11-29T22:36:02+00:00"
|
"time": "2020-05-21T20:09:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
@ -915,12 +915,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b"
|
"reference": "f654c159f0ecf03f34f8da433b98c40950696671"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f654c159f0ecf03f34f8da433b98c40950696671",
|
||||||
"reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b",
|
"reference": "f654c159f0ecf03f34f8da433b98c40950696671",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -964,7 +964,7 @@
|
|||||||
],
|
],
|
||||||
"description": "ThinkPHP v6.0 Development Library",
|
"description": "ThinkPHP v6.0 Development Library",
|
||||||
"homepage": "http://framework.thinkadmin.top",
|
"homepage": "http://framework.thinkadmin.top",
|
||||||
"time": "2020-05-19T08:03:38+00:00"
|
"time": "2020-05-21T09:42:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
|
20
vendor/composer/installed.json
vendored
20
vendor/composer/installed.json
vendored
@ -222,17 +222,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "opis/closure",
|
"name": "opis/closure",
|
||||||
"version": "3.5.1",
|
"version": "3.5.2",
|
||||||
"version_normalized": "3.5.1.0",
|
"version_normalized": "3.5.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/opis/closure.git",
|
"url": "https://github.com/opis/closure.git",
|
||||||
"reference": "93ebc5712cdad8d5f489b500c59d122df2e53969"
|
"reference": "2e3299cea6f485ca64d19c540f46d7896c512ace"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969",
|
"url": "https://api.github.com/repos/opis/closure/zipball/2e3299cea6f485ca64d19c540f46d7896c512ace",
|
||||||
"reference": "93ebc5712cdad8d5f489b500c59d122df2e53969",
|
"reference": "2e3299cea6f485ca64d19c540f46d7896c512ace",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -248,7 +248,7 @@
|
|||||||
"jeremeamia/superclosure": "^2.0",
|
"jeremeamia/superclosure": "^2.0",
|
||||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||||
},
|
},
|
||||||
"time": "2019-11-29T22:36:02+00:00",
|
"time": "2020-05-21T20:09:36+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -941,12 +941,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b"
|
"reference": "f654c159f0ecf03f34f8da433b98c40950696671"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/08dbda6ff99e8c4c531deaad340679b9366f7c0b",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f654c159f0ecf03f34f8da433b98c40950696671",
|
||||||
"reference": "08dbda6ff99e8c4c531deaad340679b9366f7c0b",
|
"reference": "f654c159f0ecf03f34f8da433b98c40950696671",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -962,7 +962,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-05-19T08:03:38+00:00",
|
"time": "2020-05-21T09:42:50+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
4
vendor/opis/closure/CHANGELOG.md
vendored
4
vendor/opis/closure/CHANGELOG.md
vendored
@ -1,6 +1,10 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
### v3.5.2, 2020.05.21
|
||||||
|
|
||||||
|
- Removed extra semicolon in short closures, since is not part of the closure's body.
|
||||||
|
|
||||||
### v3.5.1, 2019.11.30
|
### v3.5.1, 2019.11.30
|
||||||
|
|
||||||
- Bugfix. See #47
|
- Bugfix. See #47
|
||||||
|
@ -607,7 +607,6 @@ class ReflectionClosure extends ReflectionFunction
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($isShortClosure) {
|
if ($isShortClosure) {
|
||||||
$code .= ';';
|
|
||||||
$this->useVariables = $this->getStaticVariables();
|
$this->useVariables = $this->getStaticVariables();
|
||||||
} else {
|
} else {
|
||||||
$this->useVariables = empty($use) ? $use : array_intersect_key($this->getStaticVariables(), array_flip($use));
|
$this->useVariables = empty($use) ? $use : array_intersect_key($this->getStaticVariables(), array_flip($use));
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-05-20 10:19:57
|
// This file is automatically generated at:2020-05-22 11:46:04
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
@ -54,11 +54,11 @@ class MessageService extends Service
|
|||||||
|
|
||||||
private $table;
|
private $table;
|
||||||
|
|
||||||
private $china_username;
|
private $chinaUsername;
|
||||||
private $china_password;
|
private $chinaPassword;
|
||||||
|
|
||||||
private $globe_username;
|
private $globeUsername;
|
||||||
private $globe_password;
|
private $globePassword;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return $this
|
* @return $this
|
||||||
@ -69,36 +69,36 @@ class MessageService extends Service
|
|||||||
protected function initialize()
|
protected function initialize()
|
||||||
{
|
{
|
||||||
$this->table = 'SystemMessageHistory';
|
$this->table = 'SystemMessageHistory';
|
||||||
$this->china_username = sysconf('sms_zt.china_username');
|
$this->chinaUsername = sysconf('sms_zt.china_username');
|
||||||
$this->china_password = sysconf('sms_zt.china_password');
|
$this->chinaPassword = sysconf('sms_zt.china_password');
|
||||||
$this->globe_username = sysconf('sms_zt.globe_username');
|
$this->globeUsername = sysconf('sms_zt.globe_username');
|
||||||
$this->globe_password = sysconf('sms_zt.globe_password');
|
$this->globePassword = sysconf('sms_zt.globe_password');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置内陆短信认证
|
* 配置内陆短信认证
|
||||||
* @param string $username
|
* @param string $username 账号名称
|
||||||
* @param string $password
|
* @param string $password 账号密码
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function configChina($username, $password): MessageService
|
public function configChina($username, $password): MessageService
|
||||||
{
|
{
|
||||||
$this->china_username = $username;
|
$this->chinaUsername = $username;
|
||||||
$this->china_password = $password;
|
$this->chinaPassword = $password;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置国际短信认证
|
* 配置国际短信认证
|
||||||
* @param string $username
|
* @param string $username 账号名称
|
||||||
* @param string $password
|
* @param string $password 账号密码
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function configGlobe($username, $password): MessageService
|
public function configGlobe($username, $password): MessageService
|
||||||
{
|
{
|
||||||
$this->globe_username = $username;
|
$this->globeUsername = $username;
|
||||||
$this->globe_password = $password;
|
$this->globePassword = $password;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ class MessageService extends Service
|
|||||||
* 发送国内短信验证码
|
* 发送国内短信验证码
|
||||||
* @param string $phone 手机号
|
* @param string $phone 手机号
|
||||||
* @param string $content 短信内容
|
* @param string $content 短信内容
|
||||||
* @param string $productid 短信通道ID
|
* @param string $productid 短信通道
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function sendChinaSms($phone, $content, $productid = '676767')
|
public function sendChinaSms($phone, $content, $productid = '676767')
|
||||||
@ -141,9 +141,9 @@ class MessageService extends Service
|
|||||||
'tkey' => $tkey,
|
'tkey' => $tkey,
|
||||||
'mobile' => $phone,
|
'mobile' => $phone,
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'username' => $this->china_username,
|
'username' => $this->chinaUsername,
|
||||||
'productid' => $productid,
|
'productid' => $productid,
|
||||||
'password' => md5(md5($this->china_password) . $tkey),
|
'password' => md5(md5($this->chinaPassword) . $tkey),
|
||||||
]);
|
]);
|
||||||
list($code, $message) = explode(',', $result . ',');
|
list($code, $message) = explode(',', $result . ',');
|
||||||
$this->app->db->name($this->table)->insert([
|
$this->app->db->name($this->table)->insert([
|
||||||
@ -203,8 +203,8 @@ class MessageService extends Service
|
|||||||
{
|
{
|
||||||
$tkey = date("YmdHis");
|
$tkey = date("YmdHis");
|
||||||
$result = HttpExtend::post('http://www.ztsms.cn/balanceN.do', [
|
$result = HttpExtend::post('http://www.ztsms.cn/balanceN.do', [
|
||||||
'username' => $this->china_username, 'tkey' => $tkey,
|
'username' => $this->chinaUsername, 'tkey' => $tkey,
|
||||||
'password' => md5(md5($this->china_password) . $tkey),
|
'password' => md5(md5($this->chinaPassword) . $tkey),
|
||||||
]);
|
]);
|
||||||
if ($result > -1) {
|
if ($result > -1) {
|
||||||
return ['code' => 1, 'num' => $result, 'msg' => '获取短信剩余条数成功!'];
|
return ['code' => 1, 'num' => $result, 'msg' => '获取短信剩余条数成功!'];
|
||||||
@ -265,7 +265,7 @@ class MessageService extends Service
|
|||||||
{
|
{
|
||||||
$tkey = date("YmdHis");
|
$tkey = date("YmdHis");
|
||||||
$result = HttpExtend::post('http://intl.zthysms.com/intBalance.do', [
|
$result = HttpExtend::post('http://intl.zthysms.com/intBalance.do', [
|
||||||
'username' => $this->globe_username, 'tkey' => $tkey, 'password' => md5(md5($this->globe_password) . $tkey),
|
'username' => $this->globeUsername, 'tkey' => $tkey, 'password' => md5(md5($this->globePassword) . $tkey),
|
||||||
]);
|
]);
|
||||||
if (!is_numeric($result) && ($state = intval($result)) && isset($this->globeMessageMap[$state])) {
|
if (!is_numeric($result) && ($state = intval($result)) && isset($this->globeMessageMap[$state])) {
|
||||||
return ['code' => 0, 'num' => 0, 'msg' => $this->globeMessageMap[$state]];
|
return ['code' => 0, 'num' => 0, 'msg' => $this->globeMessageMap[$state]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user