Commit a6565a18 authored by 姜登's avatar 姜登

gjj脚本排序

parent a4019fdc
Pipeline #11885 passed with stage
in 3 seconds
......@@ -105,7 +105,15 @@ class ScriptController extends Controller {
hubId = ret.hubId;
}
const data = await service.scripts.fetchHubSeripts(hubId);
ctx.success(data);
const array = [];
data.forEach(element => {
if (element.state === 'online') {
array.unshift(element);
} else {
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