7328b170 by yyx

1

1 parent 98f128c8
......@@ -83,7 +83,7 @@ const select_form = reactive({
// 检查登录
// const ticketUserToken = getToken();
// if (!ticketUserToken) {
const userId = userStore.user?.userId; // [TODO] 从原项目中取已登录的用户ID
const userId = userStore.user?.userId; // userId
if (!userId) {
// 未登录,打开登录弹窗
return userStore.setVisitor();
......
......@@ -4,7 +4,7 @@ import axios from "axios";
import { getToken } from "./local-store";
import { ElMessage } from "element-plus";
const baseURL = "http://101.43.15.205:8084"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL
const baseURL = "https://radv4.gitliuyi.top/ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL
const timeout = 15000; // 请求超时时间
const http = axios.create({
......@@ -20,7 +20,7 @@ http.interceptors.request.use(
(config) => {
// 在发送请求之前做些什么
const TOKEN = getToken();
if(TOKEN) config.headers.Authorization = TOKEN;
if (TOKEN) config.headers.Authorization = TOKEN;
if (config.method == "get") config.params = config.data;
return config;
},
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!