20240205
e 3 years ago
parent 6729797457
commit 25d2bde53f
  1. 8
      src/api/api.js
  2. 6
      src/pages/lobbyManager/list/index.vue

@ -27,8 +27,6 @@ service.interceptors.response.use(
if(error.response && error.response.status == 404){ if(error.response && error.response.status == 404){
router.push('/blank.vue') router.push('/blank.vue')
} }
return Promise.reject(error.response) return Promise.reject(error.response)
} }
) )
@ -48,8 +46,6 @@ if(tokens){
}else{ }else{
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
} }
console.log(token)
// let token = sessionStorage.getItem('token')
export function get(url, params = {}) { export function get(url, params = {}) {
// params.t = new Date().getTime(); //get方法加一个时间参数,解决ie下可能缓存问题. // params.t = new Date().getTime(); //get方法加一个时间参数,解决ie下可能缓存问题.
return service({ return service({
@ -61,8 +57,6 @@ export function get(url, params = {}) {
params params
}) })
} }
//封装post请求 //封装post请求
export function post(url, data = {}) { export function post(url, data = {}) {
//默认配置 //默认配置
@ -78,7 +72,6 @@ export function post(url, data = {}) {
sendObject.data=JSON.stringify(data); sendObject.data=JSON.stringify(data);
return service(sendObject) return service(sendObject)
} }
//封装put方法 (resfulAPI常用) //封装put方法 (resfulAPI常用)
export function put(url,data = {}){ export function put(url,data = {}){
return service({ return service({
@ -101,7 +94,6 @@ export function deletes(url){
} }
}) })
} }
//不要忘记export //不要忘记export
export { export {
service service

@ -1,7 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<img class="sth manager" src="@/assets/img/manager.png" alt=""> <img class="sth manager" src="@/assets/img/manager.png" alt="">
<img class="sth guide" src="@/assets/img/guide.png" alt=""> <img class="sth guide" @click="toPart('../index/list')" src="@/assets/img/guide.png" alt="">
<div class="actions"> <div class="actions">
<ul class="btns"> <ul class="btns">
@ -170,7 +170,9 @@ export default {
this.takeVisible = false this.takeVisible = false
this.takeResultVisible = true this.takeResultVisible = true
}, },
toPart(path){
this.$router.push(path)
},
showData(){ showData(){
this.dataVisible = true this.dataVisible = true
}, },

Loading…
Cancel
Save