putSession(){ wx.request({ url: 'http://127.0.0.1:8000/api/test1', success(res){ console.log(res); wx.setStorageSync('session', res.cookies) }, dataType : 'json' }) } , getSession(){ var header = { 'cookie' : wx.getStorageSync('session').toString() }; wx.request({ url: 'http://127.0.0.1:8000/api/test2', header : header , success(res){ console.log(res); } }) } ,
标签:0.1,res,header,api,cookie,刷新,wx From: https://www.cnblogs.com/zdcblog/p/17723027.html