Browse Source

添加refer1

hella_online_20240823
zhang_li 4 weeks ago
parent
commit
636a49b5dc
  1. 8
      src/api/httpRequest3.js

8
src/api/httpRequest3.js

@ -16,13 +16,17 @@ function service(options = {}) {
// } // }
var requestUrl = "" var requestUrl = ""
requestUrl = import.meta.env.VITE_BASE_URL requestUrl = import.meta.env.VITE_BASE_URL
// 获取当前页面路由
let pages = getCurrentPages(); // 获取所有页面栈的实例数组
let currentPage = pages[pages.length - 1]; // 获取最后一个页面的实例
let currentRoute = currentPage.route; // 获取当前页面的路由
options.header = { options.header = {
"content-type": "application/json", "content-type": "application/json",
"Authorization": "Bearer " + token, "Authorization": "Bearer " + token,
"dataType": "json", "dataType": "json",
"dataSource": "PDA", "dataSource": "PDA",
"tenant-id": tenantId "tenant-id": tenantId,
"referer1":currentPage.route
}; };
options.timeout = 300000 options.timeout = 300000

Loading…
Cancel
Save