fix: 更新会话cookie键名并添加随机会话生成

更新登录请求中的cookie键名从"_miucms_session"到"XPHP_SESSION_ID"
在应用启动时生成40位随机字符串作为会话ID
This commit is contained in:
2025-06-24 18:53:41 +08:00
parent 678d35042a
commit 93a3cb9b58
2 changed files with 20 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ function n(a) {
return wx.showLoading(), new Promise(function (n, c) {
console.log("requestdevicecode", o.globalData.devicecode);
var i = Object.assign({}, {
devicecode: o.globalData.devicecode
}, o.globalData.options, t);
@@ -36,7 +37,7 @@ function n(a) {
header: {
"content-type": "application/json",
Accept: "application/json, text/plain",
Cookie: "_miucms_session=" + wx.getStorageSync("_miucms_session"),
Cookie: "XPHP_SESSION_ID=" + wx.getStorageSync("session"),
token: wx.getStorageSync("session") || ""
},
method: method,