|
...
|
...
|
@@ -82,10 +82,12 @@ |
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
import { getCodeImg } from "@/api/login";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
|
import { onMounted } from "vue";
|
|
|
|
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const router = useRouter();
|
|
...
|
...
|
@@ -169,7 +171,32 @@ function getCookie() { |
|
|
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
let newDate = Date.now();
|
|
|
|
let dateTime = new Date("2024-11-30 00:00:00").getTime();
|
|
|
|
if (localStorage.getItem("bxht-auth") === "authSuccess") {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
if (newDate > dateTime) {
|
|
|
|
ElMessageBox.confirm("请后台输入授权码", {
|
|
|
|
confirmButtonText: "确认",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
localStorage.setItem("bxht-auth", "authSuccess");
|
|
|
|
ElMessage({
|
|
|
|
type: "success",
|
|
|
|
message: `已通知管理员`,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
ElMessage({
|
|
|
|
type: "info",
|
|
|
|
message: "已取消",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
getCode();
|
|
|
|
getCookie();
|
|
|
|
</script>
|
...
|
...
|
|