Commit 2bbe1430 authored by 姜登's avatar 姜登

sb

parent 72e4c218
...@@ -19,6 +19,9 @@ class ScriptController extends Controller { ...@@ -19,6 +19,9 @@ class ScriptController extends Controller {
return !(limitScriptsList.includes(item.id)); return !(limitScriptsList.includes(item.id));
}); });
} }
data = data.filter(item => {
return !(item.state === 'none');
});
ctx.success(data); ctx.success(data);
} }
...@@ -69,7 +72,15 @@ class ScriptController extends Controller { ...@@ -69,7 +72,15 @@ class ScriptController extends Controller {
hubId = ret.hubId; hubId = ret.hubId;
} }
const data = await service.scripts.fetchHubSeripts(hubId); const data = await service.scripts.fetchHubSeripts(hubId);
ctx.success(data); const array = [];
data.forEach(element => {
if (element.state === 'online') {
array.unshift(element);
} else if (element.state !== 'none') {
array.push(element);
}
});
ctx.success(array);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment