代码提交

This commit is contained in:
lixiaobang 2022-12-13 17:20:37 +08:00
parent 1b85112ddd
commit 4d3c0c59fb
4 changed files with 21 additions and 15 deletions

View File

@ -32,7 +32,7 @@
<script>
import MinxinItem from "./mixins"
import axios from 'axios'
import {getWather} from "./api/index.js";
import {getWather,Weather} from "./api/index.js";
export default {
name: 'home',
mixins:[MinxinItem],
@ -60,9 +60,8 @@ export default {
handleWather(){
// axios({url:"http://www.jcznedu.com:5000/weather/prediction/?city=&&limit=3",methods:'GET'}).then(res=>{
// })
getWather({
city:'盐都',
limit:'3'
Weather({
}).then((res)=>{
this.weatherArr = res.data.data.daly;
this.weatherArr[0].date = '今天';

View File

@ -55,9 +55,15 @@ export const getPbtyqk = (params) => {
params
})
};
// //查询天气
// export const getWather = (params) => {
// return axios.get('aps/weather/prediction/', {
// params
// })
// };
//查询天气
export const getWather = (params) => {
return axios.get('aps/weather/prediction/', {
export const Weather = (params) => {
return axios.get('api/Handler/Weather.ashx', {
params
})
};

View File

@ -458,6 +458,7 @@ export default {
}).then((res)=>{
let dataPbty = [];
dataPbty = res.data.data
console.log(dataPbty,'dataPbty');
this.detailedFive(dataPbty);
let dataPb = [];
let dataCf = [];

View File

@ -23,15 +23,15 @@ module.exports = {
'^/api':'',
}
},
'/aps': { //代理的名字
target:'http://www.jcznedu.com:5000/',
// target: 'http://172.16.1.254:3111/',
ws: true,
changeOrigin: true,
pathRewrite:{
'^/aps':'',
}
}
// '/aps': { //代理的名字
// target:'http://www.jcznedu.com:5000/',
// // target: 'http://172.16.1.254:3111/',
// ws: true,
// changeOrigin: true,
// pathRewrite:{
// '^/aps':'',
// }
// }
}
}
}