登录成功后再次发送请求会话丢失处理。在请求头中设置cookie。
wx.request({
url: url,
method:'POST',
data:data,
header: {cookie:wx.getStorageSync('session_id')},
success:res=>{
if(res.header['Set-Cookie']){
wx.setStorageSync('session_id', res.header['Set-Cookie']);
}
}
})