Skip to content

Commit

Permalink
Snapshot 2.95e
Browse files Browse the repository at this point in the history
  • Loading branch information
Tai7sy committed Dec 1, 2019
1 parent ba7fdc6 commit 14aee15
Show file tree
Hide file tree
Showing 79 changed files with 124 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"2.95d","md5":"2451129b92d3e083db53a53494e61521","url":"https:\/\/github.com\/Tai7sy\/card-system\/releases\/download\/2.95d\/card_release.tar.gz"}
{"version":"2.95e","md5":"6d665cc909072a6fb5a2216b1e7061f9","url":"https:\/\/github.com\/Tai7sy\/card-system\/releases\/download\/2.95e\/card_release.tar.gz"}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

### 关于

> 当前版本: 2.95d
> 当前版本: 2.95e
> 支付网关: [card-gateway](https://github.com/Tai7sy/card-gateway)
Expand Down
2 changes: 1 addition & 1 deletion app/Card.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\DB; class Card extends Model { protected $guarded = array(); use SoftDeletes; protected $dates = array('deleted_at'); const STATUS_NORMAL = 0; const STATUS_SOLD = 1; const STATUS_USED = 2; const TYPE_ONETIME = 0; const TYPE_REPEAT = 1; function orders() { return $this->hasMany(Order::class); } function product() { return $this->belongsTo(Product::class); } function getCountAttribute() { return $this->count_all - $this->count_sold; } public static function add_cards($spf5ae13, $sp1b83a8, $spe7b1c7, $sp732cf7, $spb73662, $spd3d838) { DB::statement('call add_cards(?,?,?,?,?,?)', array($spf5ae13, $sp1b83a8, $spe7b1c7, $sp732cf7, $spb73662, (int) $spd3d838)); } public static function _trash($spca8acc) { DB::transaction(function () use($spca8acc) { $spd2ab5e = clone $spca8acc; $spd2ab5e->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp43445b) { foreach ($sp43445b as $sp78bb46) { $sp9dfc99 = \App\Product::where('id', $sp78bb46->product_id)->lockForUpdate()->first(); if ($sp9dfc99) { $sp9dfc99->count_all -= $sp78bb46->count_left; $sp9dfc99->saveOrFail(); } } }); $spca8acc->delete(); return true; }); } public static function _restore($spca8acc) { DB::transaction(function () use($spca8acc) { $spd2ab5e = clone $spca8acc; $spd2ab5e->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp43445b) { foreach ($sp43445b as $sp78bb46) { $sp9dfc99 = \App\Product::where('id', $sp78bb46->product_id)->lockForUpdate()->first(); if ($sp9dfc99) { $sp9dfc99->count_all += $sp78bb46->count_left; $sp9dfc99->saveOrFail(); } } }); $spca8acc->restore(); return true; }); } }
namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\DB; class Card extends Model { protected $guarded = array(); use SoftDeletes; protected $dates = array('deleted_at'); const STATUS_NORMAL = 0; const STATUS_SOLD = 1; const STATUS_USED = 2; const TYPE_ONETIME = 0; const TYPE_REPEAT = 1; function orders() { return $this->hasMany(Order::class); } function product() { return $this->belongsTo(Product::class); } function getCountAttribute() { return $this->count_all - $this->count_sold; } public static function add_cards($spdad372, $sp5d967e, $sp0fe7ec, $sp31859f, $sp3301fd, $sp0d89d4) { DB::statement('call add_cards(?,?,?,?,?,?)', array($spdad372, $sp5d967e, $sp0fe7ec, $sp31859f, $sp3301fd, (int) $sp0d89d4)); } public static function _trash($sp6cb35e) { DB::transaction(function () use($sp6cb35e) { $spb8b025 = clone $sp6cb35e; $spb8b025->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp1432b9) { foreach ($sp1432b9 as $sp4c126d) { $spe7d79d = \App\Product::where('id', $sp4c126d->product_id)->lockForUpdate()->first(); if ($spe7d79d) { $spe7d79d->count_all -= $sp4c126d->count_left; $spe7d79d->saveOrFail(); } } }); $sp6cb35e->delete(); return true; }); } public static function _restore($sp6cb35e) { DB::transaction(function () use($sp6cb35e) { $spb8b025 = clone $sp6cb35e; $spb8b025->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp1432b9) { foreach ($sp1432b9 as $sp4c126d) { $spe7d79d = \App\Product::where('id', $sp4c126d->product_id)->lockForUpdate()->first(); if ($spe7d79d) { $spe7d79d->count_all += $sp4c126d->count_left; $spe7d79d->saveOrFail(); } } }); $sp6cb35e->restore(); return true; }); } }
2 changes: 1 addition & 1 deletion app/Category.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
namespace App; use App\Library\Helper; use Illuminate\Database\Eloquent\Model; class Category extends Model { protected $guarded = array(); function getUrlAttribute() { return config('app.url') . '/c/' . Helper::id_encode($this->id, Helper::ID_TYPE_CATEGORY); } function products() { return $this->hasMany(Product::class); } function user() { return $this->belongsTo(User::class); } function getTmpPassword() { return md5('$wGgMd45Jgi@dBDR' . $this->password . '1#DS2%!VLqJolmMD'); } function getProductsForShop() { $spde3992 = Product::where('category_id', $this->id)->where('enabled', 1)->orderBy('sort')->get(); foreach ($spde3992 as $sp9dfc99) { $sp9dfc99->setForShop($this->user); } $this->addVisible(array('products')); $this->setAttribute('products', $spde3992); return $spde3992; } }
namespace App; use App\Library\Helper; use Illuminate\Database\Eloquent\Model; class Category extends Model { protected $guarded = array(); function getUrlAttribute() { return config('app.url') . '/c/' . Helper::id_encode($this->id, Helper::ID_TYPE_CATEGORY); } function products() { return $this->hasMany(Product::class); } function user() { return $this->belongsTo(User::class); } function getTmpPassword() { return md5('$wGgMd45Jgi@dBDR' . $this->password . '1#DS2%!VLqJolmMD'); } function getProductsForShop() { $sp6c9c2f = Product::where('category_id', $this->id)->where('enabled', 1)->orderBy('sort')->get(); foreach ($sp6c9c2f as $spe7d79d) { $spe7d79d->setForShop($this->user); } $this->addVisible(array('products')); $this->setAttribute('products', $sp6c9c2f); return $sp6c9c2f; } }
4 changes: 2 additions & 2 deletions app/Console/Commands/ResetPassword.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
namespace App\Console\Commands; use Illuminate\Console\Command; class ResetPassword extends Command { protected $signature = 'reset:password {email} {password}'; protected $description = 'Reset the password of user
Usage: php artisan reset:password [email protected]'; public function __construct() { parent::__construct(); } public function handle() { $sp667296 = $this->argument('email'); if (!$sp667296) { $this->warn('please input the user\'s email
'); return false; } $spac34b1 = \App\User::where('email', $sp667296)->first(); if (!$spac34b1) { $this->warn("can't find the user: {$sp667296} \nplease input the user's email\n"); return false; } $spdc3802 = $this->argument('password'); $spac34b1->password = bcrypt($spdc3802); $spac34b1->save(); $this->info("the password of '{$sp667296}' has been set to {$spdc3802}\n"); return true; } }
Usage: php artisan reset:password [email protected]'; public function __construct() { parent::__construct(); } public function handle() { $sp551dce = $this->argument('email'); if (!$sp551dce) { $this->warn('please input the user\'s email
'); return false; } $spb14cf0 = \App\User::where('email', $sp551dce)->first(); if (!$spb14cf0) { $this->warn("can't find the user: {$sp551dce} \nplease input the user's email\n"); return false; } $sp42016f = $this->argument('password'); $spb14cf0->password = bcrypt($sp42016f); $spb14cf0->save(); $this->info("the password of '{$sp551dce}' has been set to {$sp42016f}\n"); return true; } }
12 changes: 6 additions & 6 deletions app/Console/Commands/Update.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
namespace App\Console\Commands; use App\Library\CurlRequest; use function DeepCopy\deep_copy; use Illuminate\Console\Command; use Illuminate\Support\Str; class Update extends Command { protected $signature = 'update {--proxy=} {--proxy-auth=}'; protected $description = 'check update'; public function __construct() { parent::__construct(); } private function download_progress($sp0784c1, $spfe2766) { $spd14037 = fopen($spfe2766, 'w+'); if (!$spd14037) { return false; } $spf86e31 = curl_init(); curl_setopt($spf86e31, CURLOPT_URL, $sp0784c1); curl_setopt($spf86e31, CURLOPT_FOLLOWLOCATION, true); curl_setopt($spf86e31, CURLOPT_RETURNTRANSFER, true); curl_setopt($spf86e31, CURLOPT_FILE, $spd14037); curl_setopt($spf86e31, CURLOPT_PROGRESSFUNCTION, function ($sp1eb5e5, $spad20fe, $sp1d9593, $sp52e253, $spb26e6f) { if ($spad20fe > 0) { echo ' download: ' . sprintf('%.2f', $sp1d9593 / $spad20fe * 100) . '%'; } }); curl_setopt($spf86e31, CURLOPT_NOPROGRESS, false); curl_setopt($spf86e31, CURLOPT_HEADER, 0); curl_setopt($spf86e31, CURLOPT_USERAGENT, 'card update'); if (defined('MY_PROXY')) { $spee5a33 = MY_PROXY; $sp1437c3 = CURLPROXY_HTTP; if (strpos($spee5a33, 'http://') || strpos($spee5a33, 'https://')) { $spee5a33 = str_replace('http://', $spee5a33, $spee5a33); $spee5a33 = str_replace('https://', $spee5a33, $spee5a33); $sp1437c3 = CURLPROXY_HTTP; } elseif (strpos($spee5a33, 'socks4://')) { $spee5a33 = str_replace('socks4://', $spee5a33, $spee5a33); $sp1437c3 = CURLPROXY_SOCKS4; } elseif (strpos($spee5a33, 'socks4a://')) { $spee5a33 = str_replace('socks4a://', $spee5a33, $spee5a33); $sp1437c3 = CURLPROXY_SOCKS4A; } elseif (strpos($spee5a33, 'socks5://')) { $spee5a33 = str_replace('socks5://', $spee5a33, $spee5a33); $sp1437c3 = CURLPROXY_SOCKS5_HOSTNAME; } curl_setopt($spf86e31, CURLOPT_PROXY, $spee5a33); curl_setopt($spf86e31, CURLOPT_PROXYTYPE, $sp1437c3); if (defined('MY_PROXY_PASS')) { curl_setopt($spf86e31, CURLOPT_PROXYUSERPWD, MY_PROXY_PASS); } } curl_exec($spf86e31); curl_close($spf86e31); echo '
'; return true; } public function handle() { set_time_limit(0); $spee5a33 = $this->option('proxy'); if (!empty($spee5a33)) { define('MY_PROXY', $spee5a33); } $sp3e4ff9 = $this->option('proxy-auth'); if (!empty($sp3e4ff9)) { define('MY_PROXY_PASS', $sp3e4ff9); } \Artisan::call('cache:clear'); \Artisan::call('config:clear'); echo '
'; $this->comment('检查更新中...'); $this->info('当前版本: ' . config('app.version')); $sp50de9a = @json_decode(CurlRequest::get('https://raw.githubusercontent.com/Tai7sy/card-system/master/.version'), true); if (!@$sp50de9a['version']) { $this->warn('检查更新失败!'); $this->warn('Error: ' . ($sp50de9a ? json_encode($sp50de9a) : 'Network error')); goto LABEL_EXIT; } if (config('app.version') >= $sp50de9a['version']) { $this->comment('您的版本已是最新!'); goto LABEL_EXIT; } $this->info('最新版本: ' . $sp50de9a['version']); $this->info('版本说明: ' . (@$sp50de9a['description'] ?? '')); $spa76c5d = strtolower($this->ask('是否现在更新 (yes/no)', 'no')); if ($spa76c5d !== 'yes') { goto LABEL_EXIT; } $sp7c1eea = realpath(sys_get_temp_dir()); if (strlen($sp7c1eea) < 3) { $this->warn('获取临时目录失败!'); goto LABEL_EXIT; } $sp7c1eea .= DIRECTORY_SEPARATOR . Str::random(16); if (!mkdir($sp7c1eea) || !is_writable($sp7c1eea) || !is_readable($sp7c1eea)) { $this->warn('临时目录不可读写!'); goto LABEL_EXIT; } if (!function_exists('exec')) { $this->warn('函数 exec 已被禁用, 无法继续更新!'); goto LABEL_EXIT; } if (PHP_OS === 'WINNT') { $spf704a8 = 'C:\\Program Files\\7-Zip\\7z.exe'; if (!is_file($spf704a8)) { $spf704a8 = strtolower($this->ask('未找到7-Zip, 请手动输入7zG.exe路径', $spf704a8)); } if (!is_file($spf704a8)) { $this->warn('7-Zip不可用, 请安装7-Zip后重试'); goto LABEL_EXIT; } $spf704a8 = '"' . $spf704a8 . '"'; } else { exec('tar --version', $sp1f82a5, $sp2e14e1); if ($sp2e14e1) { $this->warn('Error: tar --version
namespace App\Console\Commands; use App\Library\CurlRequest; use function DeepCopy\deep_copy; use Illuminate\Console\Command; use Illuminate\Support\Str; class Update extends Command { protected $signature = 'update {--proxy=} {--proxy-auth=}'; protected $description = 'check update'; public function __construct() { parent::__construct(); } private function download_progress($sp40b98a, $sp18714b) { $spd47e35 = fopen($sp18714b, 'w+'); if (!$spd47e35) { return false; } $sp1942b5 = curl_init(); curl_setopt($sp1942b5, CURLOPT_URL, $sp40b98a); curl_setopt($sp1942b5, CURLOPT_FOLLOWLOCATION, true); curl_setopt($sp1942b5, CURLOPT_RETURNTRANSFER, true); curl_setopt($sp1942b5, CURLOPT_FILE, $spd47e35); curl_setopt($sp1942b5, CURLOPT_PROGRESSFUNCTION, function ($sp9a93da, $spe88c84, $sp907eef, $sp64c1e8, $spd523a9) { if ($spe88c84 > 0) { echo ' download: ' . sprintf('%.2f', $sp907eef / $spe88c84 * 100) . '%'; } }); curl_setopt($sp1942b5, CURLOPT_NOPROGRESS, false); curl_setopt($sp1942b5, CURLOPT_HEADER, 0); curl_setopt($sp1942b5, CURLOPT_USERAGENT, 'card update'); if (defined('MY_PROXY')) { $sp34031d = MY_PROXY; $sp9e3584 = CURLPROXY_HTTP; if (strpos($sp34031d, 'http://') || strpos($sp34031d, 'https://')) { $sp34031d = str_replace('http://', $sp34031d, $sp34031d); $sp34031d = str_replace('https://', $sp34031d, $sp34031d); $sp9e3584 = CURLPROXY_HTTP; } elseif (strpos($sp34031d, 'socks4://')) { $sp34031d = str_replace('socks4://', $sp34031d, $sp34031d); $sp9e3584 = CURLPROXY_SOCKS4; } elseif (strpos($sp34031d, 'socks4a://')) { $sp34031d = str_replace('socks4a://', $sp34031d, $sp34031d); $sp9e3584 = CURLPROXY_SOCKS4A; } elseif (strpos($sp34031d, 'socks5://')) { $sp34031d = str_replace('socks5://', $sp34031d, $sp34031d); $sp9e3584 = CURLPROXY_SOCKS5_HOSTNAME; } curl_setopt($sp1942b5, CURLOPT_PROXY, $sp34031d); curl_setopt($sp1942b5, CURLOPT_PROXYTYPE, $sp9e3584); if (defined('MY_PROXY_PASS')) { curl_setopt($sp1942b5, CURLOPT_PROXYUSERPWD, MY_PROXY_PASS); } } curl_exec($sp1942b5); curl_close($sp1942b5); echo '
'; return true; } public function handle() { set_time_limit(0); $sp34031d = $this->option('proxy'); if (!empty($sp34031d)) { define('MY_PROXY', $sp34031d); } $sp80c354 = $this->option('proxy-auth'); if (!empty($sp80c354)) { define('MY_PROXY_PASS', $sp80c354); } \Artisan::call('cache:clear'); \Artisan::call('config:clear'); echo '
'; $this->comment('检查更新中...'); $this->info('当前版本: ' . config('app.version')); $spa8eada = @json_decode(CurlRequest::get('https://raw.githubusercontent.com/Tai7sy/card-system/master/.version'), true); if (!@$spa8eada['version']) { $this->warn('检查更新失败!'); $this->warn('Error: ' . ($spa8eada ? json_encode($spa8eada) : 'Network error')); goto LABEL_EXIT; } if (config('app.version') >= $spa8eada['version']) { $this->comment('您的版本已是最新!'); goto LABEL_EXIT; } $this->info('最新版本: ' . $spa8eada['version']); $this->info('版本说明: ' . (@$spa8eada['description'] ?? '')); $spa51178 = strtolower($this->ask('是否现在更新 (yes/no)', 'no')); if ($spa51178 !== 'yes') { goto LABEL_EXIT; } $sp0a9be2 = realpath(sys_get_temp_dir()); if (strlen($sp0a9be2) < 3) { $this->warn('获取临时目录失败!'); goto LABEL_EXIT; } $sp0a9be2 .= DIRECTORY_SEPARATOR . Str::random(16); if (!mkdir($sp0a9be2) || !is_writable($sp0a9be2) || !is_readable($sp0a9be2)) { $this->warn('临时目录不可读写!'); goto LABEL_EXIT; } if (!function_exists('exec')) { $this->warn('函数 exec 已被禁用, 无法继续更新!'); goto LABEL_EXIT; } if (PHP_OS === 'WINNT') { $sp83bf5d = 'C:\\Program Files\\7-Zip\\7z.exe'; if (!is_file($sp83bf5d)) { $sp83bf5d = strtolower($this->ask('未找到7-Zip, 请手动输入7zG.exe路径', $sp83bf5d)); } if (!is_file($sp83bf5d)) { $this->warn('7-Zip不可用, 请安装7-Zip后重试'); goto LABEL_EXIT; } $sp83bf5d = '"' . $sp83bf5d . '"'; } else { exec('tar --version', $sp2594b3, $sp13cfb3); if ($sp13cfb3) { $this->warn('Error: tar --version
' . join('
', $sp1f82a5)); goto LABEL_EXIT; } } $this->comment('正在下载新版本...'); $spfe2766 = $sp7c1eea . DIRECTORY_SEPARATOR . 'ka_update_' . Str::random(16) . '.tmp'; if (!$this->download_progress($sp50de9a['url'], $spfe2766)) { $this->warn('写入临时文件失败!'); goto LABEL_EXIT; } $sp83e66d = md5_file($spfe2766); if ($sp83e66d !== $sp50de9a['md5']) { $this->warn('更新文件md5校验失败!, file:' . $sp83e66d . ', require:' . $sp50de9a['md5']); goto LABEL_EXIT; } $this->comment('正在解压...'); unset($sp1f82a5); if (PHP_OS === 'WINNT') { exec("{$spf704a8} x -so {$spfe2766} | {$spf704a8} x -aoa -si -ttar -o{$sp7c1eea}", $sp1f82a5, $sp2e14e1); } else { exec("tar -zxf {$spfe2766} -C {$sp7c1eea}", $sp1f82a5, $sp2e14e1); } if ($sp2e14e1) { $this->warn('Error: 解压失败
', $sp2594b3)); goto LABEL_EXIT; } } $this->comment('正在下载新版本...'); $sp18714b = $sp0a9be2 . DIRECTORY_SEPARATOR . 'ka_update_' . Str::random(16) . '.tmp'; if (!$this->download_progress($spa8eada['url'], $sp18714b)) { $this->warn('写入临时文件失败!'); goto LABEL_EXIT; } $sp68f444 = md5_file($sp18714b); if ($sp68f444 !== $spa8eada['md5']) { $this->warn('更新文件md5校验失败!, file:' . $sp68f444 . ', require:' . $spa8eada['md5']); goto LABEL_EXIT; } $this->comment('正在解压...'); unset($sp2594b3); if (PHP_OS === 'WINNT') { exec("{$sp83bf5d} x -so {$sp18714b} | {$sp83bf5d} x -aoa -si -ttar -o{$sp0a9be2}", $sp2594b3, $sp13cfb3); } else { exec("tar -zxf {$sp18714b} -C {$sp0a9be2}", $sp2594b3, $sp13cfb3); } if ($sp13cfb3) { $this->warn('Error: 解压失败
' . join('
', $sp1f82a5)); goto LABEL_EXIT; } $this->comment('正在关闭主站...'); \Artisan::call('down'); sleep(5); $this->comment(' --> 正在清理旧文件...'); $spade944 = base_path(); foreach (array('app', 'bootstrap', 'config', 'public/dist', 'database', 'routes', 'vendor') as $spffbc51) { \File::deleteDirectory($spade944 . DIRECTORY_SEPARATOR . $spffbc51); } $this->comment(' --> 正在复制新文件...'); \File::copyDirectory($sp7c1eea . DIRECTORY_SEPARATOR . 'card_system_free_dist', $spade944); $this->comment(' --> 正在创建缓存...'); \Artisan::call('cache:clear'); \Artisan::call('route:cache'); \Artisan::call('config:cache'); $this->comment(' --> 正在更新数据库...'); \Artisan::call('migrate'); if (PHP_OS === 'WINNT') { echo '
', $sp2594b3)); goto LABEL_EXIT; } $this->comment('正在关闭主站...'); \Artisan::call('down'); sleep(5); $this->comment(' --> 正在清理旧文件...'); $sp636584 = base_path(); foreach (array('app', 'bootstrap', 'config', 'public/dist', 'database', 'routes', 'vendor') as $sp5af18a) { \File::deleteDirectory($sp636584 . DIRECTORY_SEPARATOR . $sp5af18a); } $this->comment(' --> 正在复制新文件...'); \File::copyDirectory($sp0a9be2 . DIRECTORY_SEPARATOR . 'card_system_free_dist', $sp636584); $this->comment(' --> 正在创建缓存...'); \Artisan::call('cache:clear'); \Artisan::call('route:cache'); \Artisan::call('config:cache'); $this->comment(' --> 正在更新数据库...'); \Artisan::call('migrate'); if (PHP_OS === 'WINNT') { echo '
'; $this->alert('请注意手动设置目录权限'); $this->comment(' storage 可读可写 '); $this->comment(' bootstrap/cache/ 可读可写 '); echo '
'; } else { $this->comment(' --> 正在设置目录权限...'); exec('rm -rf storage/framework/cache/data/*'); exec('chmod -R 777 storage/'); exec('chmod -R 777 bootstrap/cache/'); } $this->comment('正在启用主站...'); \Artisan::call('up'); \Artisan::call('queue:restart'); $sp904e20 = true; LABEL_EXIT: if (isset($sp7c1eea) && strlen($sp7c1eea) > 19) { $this->comment('清理临时目录...'); \File::deleteDirectory($sp7c1eea); } if (isset($sp904e20) && $sp904e20) { $this->info('更新成功!'); } if (PHP_OS === 'WINNT') { } else { exec('rm -rf storage/framework/cache/data/*'); exec('chmod -R 777 storage/'); exec('chmod -R 777 bootstrap/cache/'); } echo '
'; } else { $this->comment(' --> 正在设置目录权限...'); exec('rm -rf storage/framework/cache/data/*'); exec('chmod -R 777 storage/'); exec('chmod -R 777 bootstrap/cache/'); } $this->comment('正在启用主站...'); \Artisan::call('up'); \Artisan::call('queue:restart'); $sp2c96d9 = true; LABEL_EXIT: if (isset($sp0a9be2) && strlen($sp0a9be2) > 19) { $this->comment('清理临时目录...'); \File::deleteDirectory($sp0a9be2); } if (isset($sp2c96d9) && $sp2c96d9) { $this->info('更新成功!'); } if (PHP_OS === 'WINNT') { } else { exec('rm -rf storage/framework/cache/data/*'); exec('chmod -R 777 storage/'); exec('chmod -R 777 bootstrap/cache/'); } echo '
'; die; } }
Expand Down
Loading

0 comments on commit 14aee15

Please sign in to comment.