From ff49fedd425cebd9126b2adf6fe86cba17946acb Mon Sep 17 00:00:00 2001 From: ch Date: Fri, 10 Jun 2022 10:04:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=AF=8F=E6=AC=A1=E5=88=B7=E6=96=B0UUID?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- store/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) {