@@ -7,7 +7,7 @@ import request from './request' | |||||
export const aboutUs = () => { | export const aboutUs = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: '/api/aboutUs/about' | |||||
url: '/aboutUs/about' | |||||
}) | }) | ||||
} | } | ||||
@@ -18,6 +18,6 @@ export const aboutUs = () => { | |||||
export const memberList = (num = 1, size = 10) => { | export const memberList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aboutUs/memberList?pageNum=${num}&pageSize=${size}` | |||||
url: `/aboutUs/memberList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } |
@@ -7,7 +7,7 @@ import request from './request' | |||||
export const videoList = (num = 1, size = 10) => { | export const videoList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aigc/videoList?pageNum=${num}&pageSize=${size}` | |||||
url: `/aigc/videoList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -18,7 +18,7 @@ export const videoList = (num = 1, size = 10) => { | |||||
export const shuzirenZhiBoList = (num = 1, size = 10) => { | export const shuzirenZhiBoList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aigc/shuzirenZhiBoList?pageNum=${num}&pageSize=${size}` | |||||
url: `/aigc/shuzirenZhiBoList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -29,7 +29,7 @@ export const shuzirenZhiBoList = (num = 1, size = 10) => { | |||||
export const shuzirenList = (num = 1, size = 10) => { | export const shuzirenList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aigc/shuzirenList?pageNum=${num}&pageSize=${size}` | |||||
url: `/aigc/shuzirenList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -40,7 +40,7 @@ export const shuzirenList = (num = 1, size = 10) => { | |||||
export const lunboList = (num = 1, size = 10) => { | export const lunboList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aigc/lunboList?pageNum=${num}&pageSize=${size}` | |||||
url: `/aigc/lunboList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -51,7 +51,7 @@ export const lunboList = (num = 1, size = 10) => { | |||||
export const guanggao = (index) => { | export const guanggao = (index) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/aigc/guanggao${index}` | |||||
url: `/aigc/guanggao${index}` | |||||
}) | }) | ||||
} | } | ||||
@@ -62,6 +62,6 @@ export const guanggao = (index) => { | |||||
export const shuzirenremark = () => { | export const shuzirenremark = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: '/api/aigc/shuzirenremark' | |||||
url: '/aigc/shuzirenremark' | |||||
}) | }) | ||||
} | } |
@@ -6,7 +6,7 @@ import request from './request' | |||||
export const lunboList = (num = 1, size = 10) => { | export const lunboList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/car/lunboList?pageNum=${num}&pageSize=${size}` | |||||
url: `/car/lunboList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -17,7 +17,7 @@ export const lunboList = (num = 1, size = 10) => { | |||||
export const hotNewsConfig = () => { | export const hotNewsConfig = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: '/api/car/hotNewsConfig' | |||||
url: '/car/hotNewsConfig' | |||||
}) | }) | ||||
} | } | ||||
@@ -28,7 +28,7 @@ export const hotNewsConfig = () => { | |||||
export const hotlist = (num = 1, size = 10) => { | export const hotlist = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/news/list?type=2&pageNum=${num}&pageSize=${size}` | |||||
url: `/news/list?type=2&pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -39,7 +39,7 @@ export const hotlist = (num = 1, size = 10) => { | |||||
export const guanggao = (index) => { | export const guanggao = (index) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/car/guanggao${index}` | |||||
url: `/car/guanggao${index}` | |||||
}) | }) | ||||
} | } | ||||
@@ -50,7 +50,7 @@ export const guanggao = (index) => { | |||||
export const videoList = (num = 1, size = 10) => { | export const videoList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/car/videoList?pageNum=${num}&pageSize=${size}` | |||||
url: `/car/videoList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -6,7 +6,7 @@ import request from './request' | |||||
export const lunboList = (num = 1, size = 10) => { | export const lunboList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/index/lunboList?pageNum=${num}&pageSize=${size}` | |||||
url: `/index/lunboList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -17,7 +17,7 @@ export const lunboList = (num = 1, size = 10) => { | |||||
export const carNewsHotList = (num = 1, size = 10) => { | export const carNewsHotList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/index/carNewsHotList?pageNum=${num}&pageSize=${size}` | |||||
url: `/index/carNewsHotList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -28,7 +28,7 @@ export const carNewsHotList = (num = 1, size = 10) => { | |||||
export const yuanyuzhouHotList = (num = 1, size = 10) => { | export const yuanyuzhouHotList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/index/yuanyuzhouHotList?pageNum=${num}&pageSize=${size}` | |||||
url: `/index/yuanyuzhouHotList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -39,7 +39,7 @@ export const yuanyuzhouHotList = (num = 1, size = 10) => { | |||||
export const guanggao = (index) => { | export const guanggao = (index) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/index/guanggao${index}` | |||||
url: `/index/guanggao${index}` | |||||
}) | }) | ||||
} | } | ||||
@@ -50,7 +50,7 @@ export const guanggao = (index) => { | |||||
export const link = () => { | export const link = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: 'api/index/link' | |||||
url: '/index/link' | |||||
}) | }) | ||||
} | } | ||||
@@ -61,7 +61,7 @@ export const link = () => { | |||||
export const hotnewsConfig = () => { | export const hotnewsConfig = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: '/api/index/hotNewsConfig' | |||||
url: '/index/hotNewsConfig' | |||||
}) | }) | ||||
} | } | ||||
@@ -72,6 +72,6 @@ export const hotnewsConfig = () => { | |||||
export const hotnews = (num = 1, size = 10) => { | export const hotnews = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/news/list?type=1?pageNum=${num}&pageSize=${size}` | |||||
url: `/news/list?type=1?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } |
@@ -7,7 +7,7 @@ import request from './request' | |||||
export const guanggao = (index) => { | export const guanggao = (index) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/yuanyuzhou/guanggao${index}` | |||||
url: `/yuanyuzhou/guanggao${index}` | |||||
}) | }) | ||||
} | } | ||||
@@ -18,7 +18,7 @@ export const guanggao = (index) => { | |||||
export const lunboList = (num = 1, size = 10) => { | export const lunboList = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/yuanyuzhou/lunboList?pageNum=${num}&pageSize=${size}` | |||||
url: `/yuanyuzhou/lunboList?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -29,7 +29,7 @@ export const lunboList = (num = 1, size = 10) => { | |||||
export const hotNewsConfig = () => { | export const hotNewsConfig = () => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: '/api/yuanyuzhou/hotNewsConfig' | |||||
url: '/yuanyuzhou/hotNewsConfig' | |||||
}) | }) | ||||
} | } | ||||
@@ -40,7 +40,7 @@ export const hotNewsConfig = () => { | |||||
export const hotnews = (num = 1, size = 10) => { | export const hotnews = (num = 1, size = 10) => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/news/list?type=1?pageNum=${num}&pageSize=${size}` | |||||
url: `/news/list?type=1?pageNum=${num}&pageSize=${size}` | |||||
}) | }) | ||||
} | } | ||||
@@ -51,7 +51,7 @@ export const hotnews = (num = 1, size = 10) => { | |||||
export const zixun = (num = 1, size = 10, flag = 'XR') => { | export const zixun = (num = 1, size = 10, flag = 'XR') => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/news/list?pageNum=${num}&pageSize=${size}&type=3&subType=31&tag=${flag}` | |||||
url: `/news/list?pageNum=${num}&pageSize=${size}&type=3&subType=31&tag=${flag}` | |||||
}) | }) | ||||
} | } | ||||
@@ -62,6 +62,6 @@ export const zixun = (num = 1, size = 10, flag = 'XR') => { | |||||
export const shendu = (num = 1, size = 10, flag = 'XR') => { | export const shendu = (num = 1, size = 10, flag = 'XR') => { | ||||
return request({ | return request({ | ||||
method: 'GET', | method: 'GET', | ||||
url: `/api/news/list?pageNum=${num}&pageSize=${size}&type=3&subType=32&tag=${flag}` | |||||
url: `/news/list?pageNum=${num}&pageSize=${size}&type=3&subType=32&tag=${flag}` | |||||
}) | }) | ||||
} | } |
@@ -1,2 +1,47 @@ | |||||
import axios from 'axios' | import axios from 'axios' | ||||
export default axios.create() | |||||
// create an axios instance | |||||
const service = axios.create({ | |||||
baseURL: 'https://www.meta-autotv.com/homeC', // /api | |||||
timeout: 1000 * 30 // request timeout | |||||
}) | |||||
// request interceptor | |||||
service.interceptors.request.use( | |||||
config => { | |||||
// do something before request is sent | |||||
// const AccessToken = localStorage.getItem("AccessToken") | |||||
// if (AccessToken) { | |||||
// config.headers.token = AccessToken | |||||
// } | |||||
return config | |||||
}, | |||||
error => { | |||||
// do something with request error | |||||
console.log(error) // for debug | |||||
return Promise.reject(error) | |||||
} | |||||
) | |||||
// response interceptor | |||||
service.interceptors.response.use( | |||||
/** | |||||
* If you want to get http information such as headers or status | |||||
* Please return response => response | |||||
*/ | |||||
/** | |||||
* Determine the request status by custom code | |||||
* Here is just an example | |||||
* You can also judge the status by HTTP Status Code | |||||
*/ | |||||
response => { | |||||
// const res = response.data | |||||
return response | |||||
}, | |||||
error => { | |||||
return Promise.reject(error) | |||||
} | |||||
) | |||||
export default service |
@@ -74,7 +74,6 @@ const routes = [ | |||||
] | ] | ||||
const router = new VueRouter({ | const router = new VueRouter({ | ||||
mode: 'history', | |||||
routes | routes | ||||
}) | }) | ||||