7328b170 by yyx

1

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