|
发表于 2022-8-13 02:31:40
|
显示全部楼层
福建省泉州市
如果使用浏览器可以轻松获取
我截取一段他js的代码
saveOrUpdateEventCollection: function(e) {
var t = {
terminal: "WECHAT",
corpCode: window.$cookies.get("corpCode") || window.$cookies.get("corp_code") || window.$cookies.get("customCorpCode"),
userId: window.$cookies.get("userId") || window.$cookies.get("user_id"),
sessionId: window.$cookies.get("eln_session_id"),
version: "5.0",
osVersion: n().os
}
, s = Object(o["a"])(Object(o["a"])({}, t), e);
return e = {
openEventCollection: s
},
Object(a["a"])("/biz-oim/ps/saveOrUpdateEventCollection.do", e)
},
window. 这个应指向浏览器
还有一段js,是他的登录
e.exports = function(e) {
return new Promise((function(t, c) {
var u = e.data
, d = e.headers;
i.isFormData(u) && delete d["Content-Type"];
var h = new XMLHttpRequest;
if (e.auth) {
var f = e.auth.username || ""
, p = e.auth.password || "";
d.Authorization = "Basic " + btoa(f + ":" + p)
}
if (h.open(e.method.toUpperCase(), a(e.url, e.params, e.paramsSerializer), !0),
h.timeout = e.timeout,
h.onreadystatechange = function() {
if (h && 4 === h.readyState && (0 !== h.status || h.responseURL && 0 === h.responseURL.indexOf("file:"))) {
var n = "getAllResponseHeaders"in h ? o(h.getAllResponseHeaders()) : null
, i = e.responseType && "text" !== e.responseType ? h.response : h.responseText
, a = {
data: i,
status: h.status,
statusText: h.statusText,
headers: n,
config: e,
request: h
};
r(t, c, a),
h = null
}
}
,
h.onerror = function() {
c(l("Network Error", e, null, h)),
h = null
}
,
h.ontimeout = function() {
c(l("timeout of " + e.timeout + "ms exceeded", e, "ECONNABORTED", h)),
h = null
}
,
i.isStandardBrowserEnv()) {
var v = n("7aac")
, g = (e.withCredentials || s(e.url)) && e.xsrfCookieName ? v.read(e.xsrfCookieName) : void 0;
g && (d[e.xsrfHeaderName] = g)
}
if ("setRequestHeader"in h && i.forEach(d, (function(e, t) {
"undefined" === typeof u && "content-type" === t.toLowerCase() ? delete d[t] : h.setRequestHeader(t, e)
}
)),
e.withCredentials && (h.withCredentials = !0),
e.responseType)
try {
h.responseType = e.responseType
} catch (m) {
if ("json" !== e.responseType)
throw m
}
"function" === typeof e.onDownloadProgress && h.addEventListener("progress", e.onDownloadProgress),
"function" === typeof e.onUploadProgress && h.upload && h.upload.addEventListener("progress", e.onUploadProgress),
e.cancelToken && e.cancelToken.promise.then((function(e) {
h && (h.abort(),
c(e),
h = null)
}
)),
void 0 === u && (u = null),
h.send(u)
}
))
}
如果他代码里边说登录成功即可,不需要cookie了,
操作其他页面的时候会返回cookie,而这个cookie才是关键
|
|