2 Commits

Author SHA1 Message Date
wlkjyy 05ad6f8a44 Merge pull request 'fix: 修复了创建虚拟机无法获取镜像列表的BUG' (#7) from master into deploy
Build and Deploy Vue3 / build (push) Successful in 1m23s
Build and Deploy Vue3 / deploy (push) Successful in 9m0s
Reviewed-on: lin/ApiServer-Web-admin_dashboard_pc#7
2025-10-07 00:24:13 +08:00
wlkjyy a97f6a7202 fix: 修复了创建虚拟机无法获取镜像列表的BUG
Build and Deploy Vue3 / build (push) Successful in 1m8s
Build and Deploy Vue3 / deploy (push) Successful in 7m52s
2025-10-07 00:05:24 +08:00
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -1,6 +1,9 @@
import {http2} from "@/utils/request.js"; import {http2} from "@/utils/request.js";
/**获取镜像列表 */ /**获取镜像列表 */
export const getMirrorList = data => { export const getMirrorList = data => {
if(typeof data == "string"){
return http2.get("/v1/image/list?server_id=" + data + "&count=9999999")
}
return http2.get(`/v1/image/list?server_id=${data.server_id}&page=${data.page}&count=${data.count}&key=${data.key}&class_id=${data.class_id}`); return http2.get(`/v1/image/list?server_id=${data.server_id}&page=${data.page}&count=${data.count}&key=${data.key}&class_id=${data.class_id}`);
}; };
/*用户获取镜像列表 */ /*用户获取镜像列表 */
+3 -3
View File
@@ -223,9 +223,9 @@
:value="mirror.id" :value="mirror.id"
> >
<span style="float: left">{{ mirror.name }}</span> <span style="float: left">{{ mirror.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px"> <!-- <span style="float: right; color: #8492a6; font-size: 13px">-->
{{ mirror.size }}MB <!-- {{ mirror.size }}MB-->
</span> <!-- </span>-->
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>