安装js-cookie
npm install js-cookie --save
import Cookie from 'js-cookie' Cookie.set(‘token',token) Cookie.get('token')