diff --git a/src/api.js b/src/api.js index 6ea9da9..264461f 100644 --- a/src/api.js +++ b/src/api.js @@ -7,42 +7,61 @@ import router from "./router"; // 创建axios 实例 const instacne = axios.create({ - baseURL: "http://192.168.1.22:8686/index", + baseURL: "http://192.168.1.24:8686/index", timeout: 30000, }); -instacne.interceptors.request.use( - (config) => { - // 在发送请求之前做什么 - - return config; - }, - (err) => { - return Promise.reject(err); - } -); +const instacnePlant = axios.create({ + baseURL: "https://suyuan.lihaink.cn/", + timeout: 30000, +}); -// 响应拦截 -instacne.interceptors.response.use( - (res) => { - // if (res.data.status != 200) { - // ElMessage({ - // message: res.data.message, - // type: 'warning', - // }) - // return Promise.reject(res.data.message); +const instacneTrade = axios.create({ + baseURL: "http://192.168.1.24:8686/index", + timeout: 30000, +}); - // } - // 对响应的数据做什么 - return res.data; - }, - (err) => { - return Promise.reject(err); - } -); +const configInstacne=(ins)=>{ + ins.interceptors.request.use( + (config) => { + // 在发送请求之前做什么 + + + + return config; + }, + (err) => { + return Promise.reject(err); + } + ); + // 响应拦截 + ins.interceptors.response.use( + (res) => { + + // if (res.data.status != 200) { + // ElMessage({ + // message: res.data.message, + // type: 'warning', + // }) + // return Promise.reject(res.data.message); + + // } + // 对响应的数据做什么 + return res.data; + }, + (err) => { + return Promise.reject(err); + } + ); + +} + +configInstacne(instacne) +configInstacne(instacnePlant) +configInstacne(instacneTrade) @@ -51,6 +70,10 @@ export function sendMsg(params) { return instacne.get('/dataviewTouchPush', { params }) } +export function landListApi(params) { + return instacnePlant.get('/api/dataview.land/landList', { params }) +} + diff --git a/src/router/index.js b/src/router/index.js index 0491067..b0cc2b6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -17,7 +17,11 @@ const routes = [ name: 'tradeScreen', component: () => import('@/view/tradeScreen/index.vue'), }, - + { + path: '/plantScreen', + name: 'plantScreen', + component: () => import('@/view/plantScreen/index.vue'), + }, ] }, diff --git a/src/view/index.vue b/src/view/index.vue index e62c912..608717a 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -1,29 +1,36 @@ \ No newline at end of file diff --git a/src/view/plantScreen/index.vue b/src/view/plantScreen/index.vue new file mode 100644 index 0000000..0ab6047 --- /dev/null +++ b/src/view/plantScreen/index.vue @@ -0,0 +1,120 @@ + + + \ No newline at end of file diff --git a/src/view/plantScreen/index1.vue b/src/view/plantScreen/index1.vue new file mode 100644 index 0000000..836aff4 --- /dev/null +++ b/src/view/plantScreen/index1.vue @@ -0,0 +1,172 @@ + + + \ No newline at end of file diff --git a/src/view/tradeScreen/index.vue b/src/view/tradeScreen/index.vue index 478286e..e94e0e9 100644 --- a/src/view/tradeScreen/index.vue +++ b/src/view/tradeScreen/index.vue @@ -1,23 +1,24 @@ - - \ No newline at end of file