cookie详细方法及使用
time: number = 2*60*60*1000;// cookie过期时间两个小时 2*60*60*1000
储存cookie
this.cookieService.set("userId",this.userId,new Date(new Date().getTime() + this.time));
this.cookieService.set("userName",response.data.name,new Date(new Date().getTime() + this.time));
读取cookie
this.cookieService.get("userId");
this.cookieService.get("userName");
重新存储cookie
this.cookieService.set("userId",this.cookieService.get("userId"),new Date(new Date().getTime() + this.time));
this.cookieService.set("userName",this.cookieService.get("userName"),new Date(new Date().getTime() + this.time));
删除cookie