type:"get",
url:urlIp + "getFooter.jsonp",
dataType:"jsonp",
jsonp:"callback",
success:function(data){
if (data.status == 1) {
// dataList = data ;
//页脚数据展示
var app = data.result.APP,
m_web = data.result.M站,
amount = ((data.result.amount)/1000).toFixed(2),
other = data.result.其它,
times = data.result.time;
var footer = new Vue({
el: '.footer-r',
data: {
time:times,
amount:amount,
APP: nub(app),
其它:nub(other),
M站:nub(m_web),
},
});
}
**
我一分钟请求一次 但突然发现Vue内的data不变,用的vue2
**
获取数据写方法里,请求写在生命周期事件里。试试