This commit is contained in:
xuyucheng 2022-10-27 16:54:06 +08:00
parent 09ec0e7f9d
commit 6204bcada7
1 changed files with 12 additions and 4 deletions

View File

@ -69,7 +69,6 @@ import logo from "@/assets/img/logo.png";
import { rsaKey } from "@/utils/rsaKey.js";
import request from "@/api/request";
export default {
data() {
var validateEmail = (rule, value, callback) => {
if (value === "") {
@ -178,9 +177,18 @@ export default {
request
.BlockPost("user/login", obj)
.then((res) => {
document.cookie = "token=" + res.token;
document.cookie = "uid=" + res.uid;
window.location.href = "http://test1.fecribd.com/webapp/rating_manager/";
console.log(res)
var now = new Date();
now.setDate(now.getDate() + 1);
var cookies =
"token" +
escape(res.token) +
";expires=" +
now.toString() +
";path=/";
document.cookie = cookies;
window.location.href =
"http://localhost:8082/webapp/rating_manager/";
})
.catch((err) => {
console.log(err);