From a9b85f38023125714a9c6da514b40a3e4d801051 Mon Sep 17 00:00:00 2001 From: lixg Date: Fri, 25 Nov 2022 15:53:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=89=93=E5=BC=80=E8=8E=B7=E5=8F=96cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/config.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/config.js b/src/api/config.js index f0674203..c863cc62 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,12 +2,12 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-11-25 15:05:34 + * @LastEditTime: 2022-11-25 15:52:59 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import axios from "axios"; -// import { getCookie } from '../api/method' +import { getCookie } from '../api/method' // const Qs = require("qs"); // axios.defaults.headers.post["Content-Type"] = @@ -24,8 +24,8 @@ const http = axios.create({ http.interceptors.request.use( (config) => { - const token = localStorage.getItem("token"); - // const token = getCookie('token') + // const token = localStorage.getItem("token"); + const token = getCookie('token') // console.log('token', token) if (token) { config.headers.token = token; //测试1111 @@ -54,7 +54,7 @@ http.interceptors.response.use( if (code === 0 || code === 200) { return response; } else { - // window.open("https://u-pre.boe.com/web/", '_self'); + window.open("https://u-pre.boe.com/web/", '_self'); console.log("api %o", msg); } return response;