From 636a49b5dc79f1c3609a0961965ceeb0df4e2117 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 22 Aug 2024 13:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0refer1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/httpRequest3.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/httpRequest3.js b/src/api/httpRequest3.js index 99e3086e..b194c36d 100644 --- a/src/api/httpRequest3.js +++ b/src/api/httpRequest3.js @@ -16,13 +16,17 @@ function service(options = {}) { // } var requestUrl = "" requestUrl = import.meta.env.VITE_BASE_URL - + // 获取当前页面路由 + let pages = getCurrentPages(); // 获取所有页面栈的实例数组 + let currentPage = pages[pages.length - 1]; // 获取最后一个页面的实例 + let currentRoute = currentPage.route; // 获取当前页面的路由 options.header = { "content-type": "application/json", "Authorization": "Bearer " + token, "dataType": "json", "dataSource": "PDA", - "tenant-id": tenantId + "tenant-id": tenantId, + "referer1":currentPage.route }; options.timeout = 300000