fix: 每次刷新UUID不一样

feature/uuid-0609-ch
ch 2 years ago
parent 1c5402a7b0
commit ff49fedd42

@ -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) {

Loading…
Cancel
Save