diff --git a/store/index.js b/store/index.js index 6fca0b7..da41569 100644 --- a/store/index.js +++ b/store/index.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-04 20:35:20 * @LastEditors: ch - * @LastEditTime: 2022-06-09 18:50:16 + * @LastEditTime: 2022-06-10 10:03:32 * @Description: file content */ import { TOKEN_KEY,UUID_KEY } from "@/constants"; @@ -68,6 +68,11 @@ const mutations = { }; const actions = { async nuxtServerInit({ state, commit, dispatch }) { + // 设置uuid + const uuid = this.$cookies.get(UUID_KEY); + if (!state.uuid && uuid) { + commit("setUUID", uuid); + } // 设置token数据 const token = this.$cookies.get(TOKEN_KEY); if (!state.token && token) {