存一个有效期为7天的cookie,key = nickname, val = Ace 1、设置cookie封装 function setCookie(key, value, expires){ let now = new Date(); now.setDate(now.getDate