This commit is contained in:
wuyanwen 2019-12-27 15:56:56 +08:00
parent ef30c07f4a
commit fcc2e04b85
2 changed files with 27 additions and 21 deletions

View File

@ -11,17 +11,6 @@ use think\Paginator;
class DataDictionary extends CatchController
{
/**
*
* @time 2019年12月13日
* @throws \Exception
* @return string
*/
public function index(): string
{
return $this->fetch();
}
/**
*
* @time 2019年12月13日
@ -68,14 +57,18 @@ class DataDictionary extends CatchController
*
* @time 2019年12月13日
* @param $table
* @return \think\response\Json
* @throws \Exception
* @return string
*/
public function view($table): string
public function view($table): \think\response\Json
{
$this->table = Db::query('show full columns from ' . $table);
$fields = Db::query('show full columns from ' . $table);
return $this->fetch();
array_walk($fields, function (&$item){
$item = array_change_key_case($item);
});
return CatchResponse::success($fields);
}
/**

View File

@ -0,0 +1,13 @@
<template>
$END$
</template>
<script>
export default {
name: 'table'
}
</script>
<style scoped>
</style>