fix(admin): 修复详情页弹层内接口请求路径解析错误

This commit is contained in:
augushong
2026-08-15 10:56:01 +08:00
parent 8de759394c
commit 5a41f6a425
2 changed files with 9 additions and 6 deletions

View File

@@ -33,10 +33,13 @@ $(function () {
};
// 接口模式请求同一路由Accept: application/json 触发页面/接口同体的接口分支)
// url 用当前页完整地址:相对地址的解析基准是"当前 URL 目录"
// 详情页自身位于 /admin/xhprof.run/detail相对 'xhprof.run/detail' 会被
// 拼成 /admin/xhprof.run/xhprof.run/detail 导致 404当前页 URL 即同体
// API 端点id 已在 location.search 中,勿重复拼接 data
$.ajax({
url: 'xhprof.run/detail',
url: location.pathname + location.search,
type: 'get',
data: {id: runId},
headers: {Accept: 'application/json'},
dataType: 'json',
success: function (res) {