From b2e0accd97f9b0d0e7d4625d79f225425ff4aa85 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Sat, 18 Jul 2020 14:39:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20cookie=20support=20for=20aixos;?= =?UTF-8?q?=20:star2:=20=E6=96=B0=E5=A2=9E=EF=BC=9Aaixos=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A2=9E=E5=8A=A0=20cookie=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/mock/user/login.js | 1 + src/pages/login/Login.vue | 2 ++ src/utils/request.js | 8 ++++++++ yarn.lock | 5 +++++ 5 files changed, 17 insertions(+) diff --git a/package.json b/package.json index 6b793dc..cae6313 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "core-js": "^3.6.5", "date-fns": "^2.14.0", "enquire.js": "^2.1.6", + "js-cookie": "^2.2.1", "mockjs": "^1.1.0", "pouchdb": "^7.2.1", "viser-vue": "^2.4.8", diff --git a/src/mock/user/login.js b/src/mock/user/login.js index c22663c..7391fbe 100644 --- a/src/mock/user/login.js +++ b/src/mock/user/login.js @@ -22,6 +22,7 @@ Mock.mock('/login', 'post', ({body}) => { result.message = Mock.mock('@TIMEFIX').CN + ',欢迎回来' result.data = {} result.data.user = user + result.data.token = 'Authorization' } return result }) diff --git a/src/pages/login/Login.vue b/src/pages/login/Login.vue index c6deeef..5a503b2 100644 --- a/src/pages/login/Login.vue +++ b/src/pages/login/Login.vue @@ -76,6 +76,7 @@