refactor:优化模块上传安装时的提示信息

This commit is contained in:
妙码生花 2023-10-21 02:17:28 +08:00
parent 226ca38d7a
commit 8630e9b317
2 changed files with 4 additions and 3 deletions

View File

@ -138,9 +138,9 @@ class Module extends Backend
AdminLog::setTitle(__('Upload install module'));
$file = $this->request->get("file/s", '');
$token = $this->request->get("token/s", '');
if (!$file || !$token) {
$this->error(__('Parameter error'));
}
if (!$file) $this->error(__('Parameter error'));
if (!$token) $this->error(__('Please login to the official website account first'));
$info = [];
try {
$info = Manage::instance()->upload($token, $file);

View File

@ -24,4 +24,5 @@ return [
'Update module' => '更新模块',
'Change module state' => '改变模块状态',
'Upload install module' => '上传安装模块',
'Please login to the official website account first' => '请先使用BuildAdmin官网账户登录到模块市场~',
];