problem description
bothered me for several days, but how to assign values to iteam after ajax got the data? I don"t know why I asked for a great solution. I tried a lot of methods
.the environmental background of the problems and what methods you have tried
related codes
new Vue ({
el: "-sharpa-weather-waring",
data: {
iteam: null
},
methods: {
Get_YJweather: function() {
var _this = this;
mui.ajax("http://WeatherHandler.ashx?method=Get_YJweather", {
data: {
timefrom: "2018-12-04",
timeto: "2018-12-04"
},
dataType: "json", //json
type: "post", //HTTP
timeout: 50000, //10;
success: function(res) {
_this.iteam = res;
console.log(res);
},
error: function(xhr, type, errorThrown) {
}
});
}
}
});