Merge commit 'd84293f4' into order
Showing
3 changed files
with
9 additions
and
4 deletions
| ... | @@ -294,15 +294,14 @@ detail.fetchData(); | ... | @@ -294,15 +294,14 @@ detail.fetchData(); |
| 294 | </div> | 294 | </div> |
| 295 | <div v-else> | 295 | <div v-else> |
| 296 | <!-- v-if="detail.data?.state == 1 && detail.data?.isRefund" --> | 296 | <!-- v-if="detail.data?.state == 1 && detail.data?.isRefund" --> |
| 297 | <!-- v-if="detail.data?.state == 1 && detail.data?.isRefund" --> | 297 | <div v-if="detail.data?.state == 1 && detail.data?.isRefund" class="btn_box"> |
| 298 | <div class="btn_box"> | ||
| 299 | <div class="can_pay" @click="detail.cancelOrder()">取消购票</div> | 298 | <div class="can_pay" @click="detail.cancelOrder()">取消购票</div> |
| 300 | <div class="pay" @click="detail.comeBack()">再来一单</div> | 299 | <div class="pay" @click="detail.comeBack()">再来一单</div> |
| 301 | </div> | 300 | </div> |
| 302 | 301 | ||
| 303 | <!-- <div v-else class="btn_box"> | 302 | <div v-else class="btn_box"> |
| 304 | <div class="pay_dis">请联系工作人员</div> | 303 | <div class="pay_dis">请联系工作人员</div> |
| 305 | </div> --> | 304 | </div> |
| 306 | </div> | 305 | </div> |
| 307 | </div> | 306 | </div> |
| 308 | <div v-if="detail.data?.state == 0" class="tip"> | 307 | <div v-if="detail.data?.state == 0" class="tip"> | ... | ... |
| ... | @@ -5,6 +5,9 @@ import axios from 'axios/dist/axios' | ... | @@ -5,6 +5,9 @@ import axios from 'axios/dist/axios' |
| 5 | import { getToken } from "./local-store"; | 5 | import { getToken } from "./local-store"; |
| 6 | import { ElMessage } from "element-plus"; | 6 | import { ElMessage } from "element-plus"; |
| 7 | 7 | ||
| 8 | import { useStorage } from "@vueuse/core/index"; | ||
| 9 | const language = useStorage("language", 0); | ||
| 10 | |||
| 8 | const baseURL = "https://radv4.gitliuyi.top/ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL | 11 | const baseURL = "https://radv4.gitliuyi.top/ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL |
| 9 | const timeout = 15000; // 请求超时时间 | 12 | const timeout = 15000; // 请求超时时间 |
| 10 | 13 | ||
| ... | @@ -20,9 +23,11 @@ const http = axios.create({ | ... | @@ -20,9 +23,11 @@ const http = axios.create({ |
| 20 | http.interceptors.request.use( | 23 | http.interceptors.request.use( |
| 21 | (config) => { | 24 | (config) => { |
| 22 | // 在发送请求之前做些什么 | 25 | // 在发送请求之前做些什么 |
| 26 | if (language.value == 1) config.headers.Language = "en-us"; | ||
| 23 | const TOKEN = getToken(); | 27 | const TOKEN = getToken(); |
| 24 | if (TOKEN) config.headers.Authorization = TOKEN; | 28 | if (TOKEN) config.headers.Authorization = TOKEN; |
| 25 | if (config.method == "get") config.params = config.data; | 29 | if (config.method == "get") config.params = config.data; |
| 30 | console.log("config", config); | ||
| 26 | return config; | 31 | return config; |
| 27 | }, | 32 | }, |
| 28 | (error) => { | 33 | (error) => { | ... | ... |
-
Please register or sign in to post a comment