add 大屏调用客户环境接口
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { getAction } from '@/screenApi/manage'
|
||||
|
||||
// 汽车标准项目总体情况;包括发布的国行标、在研的国行标、立项上报的国行标、外文版项目数量
|
||||
const StanderProjectGeneralSituation = (params) => getAction( '/serviceInterface/getDpData1', params)
|
||||
|
||||
export {
|
||||
StanderProjectGeneralSituation
|
||||
}
|
||||
@@ -3,10 +3,12 @@
|
||||
*/
|
||||
import { axios } from '@/screenRequest/request'
|
||||
|
||||
export function screenGetAction(baseUrl, url, parameter) {
|
||||
const baseUrl = '/zxd'
|
||||
|
||||
export function getAction(url, parameter) {
|
||||
return axios({
|
||||
url: baseUrl + url,
|
||||
method:'post' ,
|
||||
data: parameter
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
@@ -88,6 +88,9 @@ const err = (error) => {
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(config => {
|
||||
if (config.url.indexOf('/zxd') === 0) {
|
||||
config.headers['verifyToken'] = '1SRifTFQz86Wnqz'
|
||||
}
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
if (token) {
|
||||
config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { StanderProjectGeneralSituation } from '@/screenApi/api'
|
||||
export default {
|
||||
name: 'HomePage',
|
||||
created() {
|
||||
StanderProjectGeneralSituation().then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user