Skip to content

Commit

Permalink
chore: 更新解析文件提示
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Aug 22, 2018
1 parent f3d67d9 commit 455bdf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Admin/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function parseToJsonAction($req)
return $this->err('文件不存在');
}

$data = wei()->excel->parseToArray($req['file'], $cols);
$ret = wei()->excel->parseToArray($req['file'], $cols);

return $this->response->json($data);
return $ret;
}

public function uploadAndParseToJsonAction($req)
Expand Down
1 change: 1 addition & 0 deletions src/Service/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function parseToArray($file, $cols, $startRow = 2, $maxRow = 1000)
}

return $this->suc([
'message' => '解析文件成功',
'total' => count($data),
'data' => $data,
]);
Expand Down

0 comments on commit 455bdf7

Please sign in to comment.