|
|
@@ -33,9 +33,13 @@
|
|
|
userLogin(payload)
|
|
|
.then(res => {
|
|
|
console.log(res)
|
|
|
- // token塞入饼干中
|
|
|
- const token = res.result;
|
|
|
- document.cookie = `token=${token}`
|
|
|
+ // // token塞入饼干中
|
|
|
+ // const token = res.result;
|
|
|
+ // document.cookie = `token=${token}`
|
|
|
+
|
|
|
+ // token塞入localStorage中
|
|
|
+ const token = res.result
|
|
|
+ localStorage.setItem('token', token)
|
|
|
|
|
|
// 路由跳转
|
|
|
router.push({ path: "/home" })
|