/* * @Author: ch * @Date: 2022-05-04 21:15:17 * @LastEditors: ch * @LastEditTime: 2022-05-07 11:05:11 * @Description: 服务端没有localStorage对象,在Sotre中不能直接取值,在plugins中统一为state做一次初始取值处理 */ import { TOKEN } from "./config/sotrageKey"; export default ({store})=>{ // 获取storage中的token store.commit('SET_TOKEN',localStorage.getItem(TOKEN)); }