传参
vue方法传参
mounted() {
for(let i in this.area_info){
this.Get_info(i)
}
},
methods: {
Get_info(i) {
this.$axios({
methods: "post",
url: "https://route.showapi.com/9-7",
params: {
"showapi_appid": "359757",
"showapi_sign": "4a1fc371e5f1497aabb97d440e87ee52",
"showapi_timestamp": "20200907215844",
"showapi_res_gzip": "0",
"area": this.area_info[i],
"needAlarm": "1",
"month": "202009"
}
}).then((response) => {
console.log(response.data)
this.test.push(response.data)
})
}
},