完全vue渲染列表的功能

去掉不必要的js函数定义
修改返回json的方式
This commit is contained in:
2021-03-15 06:12:12 +08:00
parent d795809fb3
commit 975be7cc91
135 changed files with 402 additions and 792 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ class ApiController extends Controller
{
$key = Request::get('key');
$rows = option($key);
return response()->json($rows)->setEncodingOptions(JSON_UNESCAPED_UNICODE);
return $rows;
}
/**
@@ -118,7 +118,7 @@ class ApiController extends Controller
{
$key = Request::get('key');
$rows = option($key);
return response()->json($rows)->setEncodingOptions(JSON_UNESCAPED_UNICODE);
return $rows;
}
/**
@@ -156,6 +156,6 @@ class ApiController extends Controller
->get()->toArray();
$rows = array_merge($title, $rows);
return response()->json($rows);
return $rows;
}
}
@@ -131,7 +131,7 @@ class AttachmentController extends DefaultController
{
$id = Request::get('id');
$rows = AttachmentService::get($id);
return response()->json($rows);
return $rows;
}
/**
@@ -141,7 +141,7 @@ class AttachmentController extends DefaultController
{
$key = Request::get('key');
$rows = AttachmentService::draft($key);
return response()->json($rows);
return $rows;
}
/**
@@ -50,10 +50,10 @@ class IndexController extends DefaultController
if ($key) {
$badge = ModuleService::badges($key);
if ($badge) {
return response()->json($badge());
return $badge();
}
}
return response()->json(['total' => 0, 'data' => []]);
return ['total' => 0, 'data' => []];
}
// 获取全部待办数量
@@ -64,6 +64,6 @@ class IndexController extends DefaultController
foreach($badges as $key => $badge) {
$json[$key] = $badge();
}
return response()->json($json);
return $json;
}
}