赞
踩
var sessionId = wx.getStorageSync("sessionId");
console.log('sid:'+sessionId)
if(sessionId == ''){
console.log('没有登录')
}
//必须先清除,否则res.header['Set-Cookie']会报错
wx.removeStorageSync('sessionId');
//储存res.header['Set-Cookie']
wx.setStorageSync("sessionId", res.data.sessionId);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。