1 读取远程数据示例
```
<script>
var _self = this;
export default {
data() {
return {
list:[],
art:[]
}
},
onLoad() {
_self = this;
this.getNews();
},
methods: {
getNews:function(){
uni.request({
url:'http://www.api.io/api/v2.blog/index',
success:function(res){
_self.list= res.data.data;
}
})
}
}
}
</script>
```
2 列表循环数据
```
<view>
<view v-for="(item,index) in list">
{{item.title}}------{{item.category_id}}
</view>
</view>
```
3 数组显示
```
<view>
<view>
{{art.title}}
</view>
</view>
```