Commit d6dc9d7a by 前端

限制uuid缓存

1 parent c491c976
......@@ -175,9 +175,10 @@ export default {
const params = { account: user, password };
let uuid = localStorage.getItem("uuid");
let isUpdate = false
if (!uuid) {
uuid = createUuid();
localStorage.setItem("uuid", uuid);
isUpdate = true
}
params.specialMark = uuid;
console.log(params);
......@@ -186,6 +187,10 @@ export default {
store.dispatch("app/showLoading", false);
if (res.code === 200) {
const { token, user } = res.data;
// 是否更新uuid
if(isUpdate){
localStorage.setItem("uuid", uuid);
}
store.dispatch("app/setUserInfo", user);
store.dispatch("app/setToken", token);
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!