<template>
	<h1> Lights </h1>
</template>
<script>

import { Cell, Group, GroupTitle } from 'vux'
import Lights from '../models/lights'

export default {
  components: {
    Cell,
    Group,
    GroupTitle
  },
  data () {
    return {
      lights: []
    }
  },
  methods: {
    fetchData () {
      var vm = this
      Lights.get({onSuccess: function (data) {
        vm.lights = data.Lights
        console.log(vm.lights)
      }})
    }
  },
  mounted () {
    // console.log('mounted')
    this.fetchData()
  }
}
</script>
<style>
</style>
