26e0db45 by yyx

seat 请求头增加Language

1 parent 84a6d2a5
......@@ -294,15 +294,14 @@ detail.fetchData();
</div>
<div v-else>
<!-- v-if="detail.data?.state == 1 && detail.data?.isRefund" -->
<!-- v-if="detail.data?.state == 1 && detail.data?.isRefund" -->
<div class="btn_box">
<div v-if="detail.data?.state == 1 && detail.data?.isRefund" class="btn_box">
<div class="can_pay" @click="detail.cancelOrder()">取消购票</div>
<div class="pay" @click="detail.comeBack()">再来一单</div>
</div>
<!-- <div v-else class="btn_box">
<div v-else class="btn_box">
<div class="pay_dis">请联系工作人员</div>
</div> -->
</div>
</div>
</div>
<div v-if="detail.data?.state == 0" class="tip">
......
......@@ -36,6 +36,7 @@ const status = reactive({
bgColor: "#DDDDDD",
},
4: {
txt: '退款中',
color: "#F740A6",
bgColor: "#FFE2F2",
},
......
......@@ -4,6 +4,9 @@ import axios from "axios";
import { getToken } from "./local-store";
import { ElMessage } from "element-plus";
import { useStorage } from "@vueuse/core/index";
const language = useStorage("language", 0);
const baseURL = "https://radv4.gitliuyi.top/ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL
const timeout = 15000; // 请求超时时间
......@@ -19,9 +22,11 @@ const http = axios.create({
http.interceptors.request.use(
(config) => {
// 在发送请求之前做些什么
if (language.value == 1) config.headers.Language = "en-us";
const TOKEN = getToken();
if (TOKEN) config.headers.Authorization = TOKEN;
if (config.method == "get") config.params = config.data;
console.log("config", config);
return config;
},
(error) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!