完全vue渲染列表的功能
去掉不必要的js函数定义 修改返回json的方式
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user