Merge branch 'dev'

This commit is contained in:
WispX
2020-03-02 07:22:23 +08:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ class Upload extends Base
public function initialize()
{
// 是否允许游客上传
$token = $this->request->header('token', $this->request->input('token'));
$token = $this->request->header('token', $this->param('token'));
if (!$this->config['allowed_tourist_upload']) {
$token && $this->auth($token);
} else {
@@ -32,7 +32,7 @@ class Upload extends Base
Db::startTrans();
try {
$data = (action('index/upload/execute'))->execute($this->user);
$data = (new \app\index\controller\Upload)->execute($this->user);
Db::commit();
} catch (Exception $e) {
+2 -2
View File
@@ -173,8 +173,8 @@ class Upload extends Base
];
if ($this->user) {
$data['quota'] = sprintf('%.2f', (float)$user->quota);
$data['use_quota'] = sprintf('%.2f', (float)$user->use_quota);
$data['quota'] = sprintf('%.2f', (float)$this->user->quota);
$data['use_quota'] = sprintf('%.2f', (float)$this->user->use_quota);
}
return $data;