Skip to content

Commit

Permalink
Snapshot 2.95d
Browse files Browse the repository at this point in the history
  • Loading branch information
Tai7sy committed Dec 1, 2019
1 parent 40cd3da commit ba7fdc6
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":"cf8a824cd66355708365e42b644a22ac","url":"https:\/\/github.com\/Tai7sy\/card-system\/releases\/download\/2.95\/card_release.tar.gz"}
{"version":"2.95d","md5":"2451129b92d3e083db53a53494e61521","url":"https:\/\/github.com\/Tai7sy\/card-system\/releases\/download\/2.95d\/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.95d
> 支付网关: [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($sp258cf6, $sp112a12, $sp460df4, $spf66c3d, $sp7c8ced, $sp46a9f0) { DB::statement('call add_cards(?,?,?,?,?,?)', array($sp258cf6, $sp112a12, $sp460df4, $spf66c3d, $sp7c8ced, (int) $sp46a9f0)); } public static function _trash($sp7e6fa3) { DB::transaction(function () use($sp7e6fa3) { $spf10bec = clone $sp7e6fa3; $spf10bec->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp5b0739) { foreach ($sp5b0739 as $sp1d0a77) { $sp1a3ec5 = \App\Product::where('id', $sp1d0a77->product_id)->lockForUpdate()->first(); if ($sp1a3ec5) { $sp1a3ec5->count_all -= $sp1d0a77->count_left; $sp1a3ec5->saveOrFail(); } } }); $sp7e6fa3->delete(); return true; }); } public static function _restore($sp7e6fa3) { DB::transaction(function () use($sp7e6fa3) { $spf10bec = clone $sp7e6fa3; $spf10bec->selectRaw('`product_id`,SUM(`count_all`-`count_sold`) as `count_left`')->groupBy('product_id')->orderByRaw('`product_id`')->chunk(100, function ($sp5b0739) { foreach ($sp5b0739 as $sp1d0a77) { $sp1a3ec5 = \App\Product::where('id', $sp1d0a77->product_id)->lockForUpdate()->first(); if ($sp1a3ec5) { $sp1a3ec5->count_all += $sp1d0a77->count_left; $sp1a3ec5->saveOrFail(); } } }); $sp7e6fa3->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($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; }); } }
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() { $sp8fefde = Product::where('category_id', $this->id)->where('enabled', 1)->orderBy('sort')->get(); foreach ($sp8fefde as $sp1a3ec5) { $sp1a3ec5->setForShop($this->user); } $this->addVisible(array('products')); $this->setAttribute('products', $sp8fefde); return $sp8fefde; } }
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; } }
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() { $spd347b9 = $this->argument('email'); if (!$spd347b9) { $this->warn('please input the user\'s email
'); return false; } $sp845283 = \App\User::where('email', $spd347b9)->first(); if (!$sp845283) { $this->warn("can't find the user: {$spd347b9} \nplease input the user's email\n"); return false; } $sp943c4c = $this->argument('password'); $sp845283->password = bcrypt($sp943c4c); $sp845283->save(); $this->info("the password of '{$spd347b9}' has been set to {$sp943c4c}\n"); return true; } }
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; } }
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($spddf3f5, $spd861bc) { $sp895553 = fopen($spd861bc, 'w+'); if (!$sp895553) { return false; } $spa9fd67 = curl_init(); curl_setopt($spa9fd67, CURLOPT_URL, $spddf3f5); curl_setopt($spa9fd67, CURLOPT_FOLLOWLOCATION, true); curl_setopt($spa9fd67, CURLOPT_RETURNTRANSFER, true); curl_setopt($spa9fd67, CURLOPT_FILE, $sp895553); curl_setopt($spa9fd67, CURLOPT_PROGRESSFUNCTION, function ($spf3c387, $spfb8a6d, $sp61d690, $sp20f458, $sp6cca7a) { if ($spfb8a6d > 0) { echo ' download: ' . sprintf('%.2f', $sp61d690 / $spfb8a6d * 100) . '%'; } }); curl_setopt($spa9fd67, CURLOPT_NOPROGRESS, false); curl_setopt($spa9fd67, CURLOPT_HEADER, 0); curl_setopt($spa9fd67, CURLOPT_USERAGENT, 'card update'); if (defined('MY_PROXY')) { $sp554d3f = MY_PROXY; $sp0e1f77 = CURLPROXY_HTTP; if (strpos($sp554d3f, 'http://') || strpos($sp554d3f, 'https://')) { $sp554d3f = str_replace('http://', $sp554d3f, $sp554d3f); $sp554d3f = str_replace('https://', $sp554d3f, $sp554d3f); $sp0e1f77 = CURLPROXY_HTTP; } elseif (strpos($sp554d3f, 'socks4://')) { $sp554d3f = str_replace('socks4://', $sp554d3f, $sp554d3f); $sp0e1f77 = CURLPROXY_SOCKS4; } elseif (strpos($sp554d3f, 'socks4a://')) { $sp554d3f = str_replace('socks4a://', $sp554d3f, $sp554d3f); $sp0e1f77 = CURLPROXY_SOCKS4A; } elseif (strpos($sp554d3f, 'socks5://')) { $sp554d3f = str_replace('socks5://', $sp554d3f, $sp554d3f); $sp0e1f77 = CURLPROXY_SOCKS5_HOSTNAME; } curl_setopt($spa9fd67, CURLOPT_PROXY, $sp554d3f); curl_setopt($spa9fd67, CURLOPT_PROXYTYPE, $sp0e1f77); if (defined('MY_PROXY_PASS')) { curl_setopt($spa9fd67, CURLOPT_PROXYUSERPWD, MY_PROXY_PASS); } } curl_exec($spa9fd67); curl_close($spa9fd67); echo '
'; return true; } public function handle() { set_time_limit(0); $sp554d3f = $this->option('proxy'); if (!empty($sp554d3f)) { define('MY_PROXY', $sp554d3f); } $sp447d56 = $this->option('proxy-auth'); if (!empty($sp447d56)) { define('MY_PROXY_PASS', $sp447d56); } \Artisan::call('cache:clear'); \Artisan::call('config:clear'); echo '
'; $this->comment('检查更新中...'); $this->info('当前版本: ' . config('app.version')); $sp00cd63 = @json_decode(CurlRequest::get('https://raw.githubusercontent.com/Tai7sy/card-system/master/.version'), true); if (!@$sp00cd63['version']) { $this->warn('检查更新失败!'); $this->warn('Error: ' . ($sp00cd63 ? json_encode($sp00cd63) : 'Network error')); goto LABEL_EXIT; } if (config('app.version') >= $sp00cd63['version']) { $this->comment('您的版本已是最新!'); goto LABEL_EXIT; } $this->info('最新版本: ' . $sp00cd63['version']); $this->info('版本说明: ' . (@$sp00cd63['description'] ?? '')); $sp91a927 = strtolower($this->ask('是否现在更新 (yes/no)', 'no')); if ($sp91a927 !== 'yes') { goto LABEL_EXIT; } $spf4ec72 = realpath(sys_get_temp_dir()); if (strlen($spf4ec72) < 3) { $this->warn('获取临时目录失败!'); goto LABEL_EXIT; } $spf4ec72 .= DIRECTORY_SEPARATOR . Str::random(16); if (!mkdir($spf4ec72) || !is_writable($spf4ec72) || !is_readable($spf4ec72)) { $this->warn('临时目录不可读写!'); goto LABEL_EXIT; } if (!function_exists('exec')) { $this->warn('函数 exec 已被禁用, 无法继续更新!'); goto LABEL_EXIT; } if (PHP_OS === 'WINNT') { $spfc8911 = 'C:\\Program Files\\7-Zip\\7z.exe'; if (!is_file($spfc8911)) { $spfc8911 = strtolower($this->ask('未找到7-Zip, 请手动输入7zG.exe路径', $spfc8911)); } if (!is_file($spfc8911)) { $this->warn('7-Zip不可用, 请安装7-Zip后重试'); goto LABEL_EXIT; } $spfc8911 = '"' . $spfc8911 . '"'; } else { exec('tar --version', $sp93ceb5, $spf691d6); if ($spf691d6) { $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($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
' . join('
', $sp93ceb5)); goto LABEL_EXIT; } } $this->comment('正在下载新版本...'); $spd861bc = $spf4ec72 . DIRECTORY_SEPARATOR . 'ka_update_' . Str::random(16) . '.tmp'; if (!$this->download_progress($sp00cd63['url'], $spd861bc)) { $this->warn('写入临时文件失败!'); goto LABEL_EXIT; } $sp75f1bb = md5_file($spd861bc); if ($sp75f1bb !== $sp00cd63['md5']) { $this->warn('更新文件md5校验失败!, file:' . $sp75f1bb . ', require:' . $sp00cd63['md5']); goto LABEL_EXIT; } $this->comment('正在解压...'); unset($sp93ceb5); if (PHP_OS === 'WINNT') { exec("{$spfc8911} x -so {$spd861bc} | {$spfc8911} x -aoa -si -ttar -o{$spf4ec72}", $sp93ceb5, $spf691d6); } else { exec("tar -zxf {$spd861bc} -C {$spf4ec72}", $sp93ceb5, $spf691d6); } if ($spf691d6) { $this->warn('Error: 解压失败
', $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: 解压失败
' . join('
', $sp93ceb5)); goto LABEL_EXIT; } $this->comment('正在关闭主站...'); \Artisan::call('down'); sleep(5); $this->comment(' --> 正在清理旧文件...'); $sp39d523 = base_path(); foreach (array('app', 'bootstrap', 'config', 'public/dist', 'database', 'routes', 'vendor') as $spde3d9c) { \File::deleteDirectory($sp39d523 . DIRECTORY_SEPARATOR . $spde3d9c); } $this->comment(' --> 正在复制新文件...'); \File::copyDirectory($spf4ec72 . DIRECTORY_SEPARATOR . 'card_system_free_dist', $sp39d523); $this->comment(' --> 正在创建缓存...'); \Artisan::call('cache:clear'); \Artisan::call('route:cache'); \Artisan::call('config:cache'); $this->comment(' --> 正在更新数据库...'); \Artisan::call('migrate'); if (PHP_OS === 'WINNT') { echo '
', $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 '
'; $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'); $sp935d85 = true; LABEL_EXIT: if (isset($spf4ec72) && strlen($spf4ec72) > 19) { $this->comment('清理临时目录...'); \File::deleteDirectory($spf4ec72); } if (isset($sp935d85) && $sp935d85) { $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'); $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 '
'; die; } }
Expand Down
Loading

0 comments on commit ba7fdc6

Please sign in to comment.