mode
This commit is contained in:
parent
f0d0cdee49
commit
b83dc6fffe
|
@ -0,0 +1,5 @@
|
|||
export default function setCookie(name,value,iDay){
|
||||
var oDate = new Date();
|
||||
oDate.setDate(oDate.getDate() + iDay);
|
||||
document.cookie = name + "=" + value + ";expires=" + oDate;
|
||||
}
|
|
@ -179,14 +179,13 @@ export default {
|
|||
.then((res) => {
|
||||
localStorage.setItem("token", res.token);
|
||||
localStorage.setItem("refresh_token", res.refresh_token);
|
||||
console.log(res.token);
|
||||
document.cookie = "token=" + res.token;
|
||||
document.cookie = "refresh_token =" + res.refresh_token;
|
||||
// ";path=/;domain=.localhost";
|
||||
console.log(document.cookie.split(";"));
|
||||
// this.$router.push("/webapp/entry_system/detail/"+res.uid)
|
||||
var now = new Date();
|
||||
now.setDate(now.getDate() + 1);
|
||||
var cookies =
|
||||
"token" + res.token + ";refresh_token" + res.refresh_token;
|
||||
";expires=" + now.toString() + ";path=/;domain=.test.fecribd.com";
|
||||
document.cookie = cookies;
|
||||
window.location.href = "http://test.fecribd.com/webapp/rating_manager/";
|
||||
window.location.href = "http://localhost:8082/webapp/rating_manager/";
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
Loading…
Reference in New Issue