1. 修改了应用端口的问题
2. 增加了创建虚拟环境的脚本和删除虚拟环境的脚本
This commit is contained in:
@@ -253,11 +253,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -387,11 +387,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -206,11 +206,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
window.open(`${protocol}//${hostname}:8080/api/dataset-manage/download/${datasetId}/${selectedFileId}`, '_blank');
|
||||
window.open(`${protocol}//${hostname}:7861/api/dataset-manage/download/${datasetId}/${selectedFileId}`, '_blank');
|
||||
}
|
||||
|
||||
// 删除数据集
|
||||
|
||||
@@ -598,11 +598,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
|
||||
<!-- 简单的交互脚本 -->
|
||||
<script>
|
||||
// 动态获取 API 基础地址(根据当前访问的 IP 自动调整)
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -326,11 +326,11 @@
|
||||
document.body.innerHTML = '';
|
||||
}
|
||||
|
||||
// 动态获取 API 基础地址(根据当前访问的 IP 自动调整)
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
@@ -1024,8 +1024,7 @@
|
||||
function downloadDataset(datasetId) {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
const baseUrl = `${protocol}//${hostname}:8080`;
|
||||
window.open(`${baseUrl}/api/dataset-manage/download/${datasetId}`, '_blank');
|
||||
window.open(`${protocol}//${hostname}:7861/api/dataset-manage/download/${datasetId}`, '_blank');
|
||||
}
|
||||
|
||||
// 开始模型对比
|
||||
|
||||
@@ -231,11 +231,11 @@
|
||||
|
||||
<script>
|
||||
console.log('>>> model-compare-chat.html 脚本开始加载');
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -278,11 +278,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.protocol === 'file:' ? 'localhost' : window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -90,11 +90,11 @@
|
||||
|
||||
<script>
|
||||
console.log('>>> model-compare-result.html 脚本开始加载');
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -450,11 +450,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -351,11 +351,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -324,11 +324,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
@@ -120,11 +120,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取 API 基础地址
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:8080/api`;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user