刚遇到的一个小问题,居然一开始写不出来,可见忘性是真的。。。
写在此以做明示。
mui.getJSON('../index.json',null,function(rs){//本地文件相对路径,参数为null,回调函数
if(rs.code == 0) {
that.pageData = rs.list;
} else {
console.log(1)
}
});
刚遇到的一个小问题,居然一开始写不出来,可见忘性是真的。。。
写在此以做明示。
mui.getJSON('../index.json',null,function(rs){//本地文件相对路径,参数为null,回调函数
if(rs.code == 0) {
that.pageData = rs.list;
} else {
console.log(1)
}
});