mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-04 07:01:37 +08:00
fix(admin): 修复详情页弹层内接口请求路径解析错误
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user