videoList.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="">
  3. <view class="cu-list menu-avatar">
  4. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in deviceData"
  5. :key="index" :data-target="'move-box-' + index" @tap="goVideoDetail">
  6. <view class="cu-avatar round lg" :style="`background-image:url(${item.imgUrl})`" style="opacity:.7"></view>
  7. <view class="content">
  8. <view class="">{{item.title}}</view>
  9. </view>
  10. <view class="nav-right num">
  11. <view v-if="item.status=='在线'" class="online" >
  12. {{item.status}}
  13. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
  14. </view>
  15. <view v-else-if="item.status=='离线'" class="text-gray" >
  16. {{item.status}}
  17. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
  18. </view>
  19. <view v-else="item.status=='异常'" class="error" >
  20. {{item.status}}
  21. <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. deviceData: [{
  33. status: '离线',
  34. imgUrl: '../../static/video-icon-off.png',
  35. title: 'C59360332',
  36. num: 6
  37. }, {
  38. status: '在线',
  39. imgUrl: '../../static/video-icon-on.png',
  40. title: 'C59360332',
  41. num: 11
  42. },
  43. {
  44. status: '异常',
  45. imgUrl: '../../static/video-icon-error.png',
  46. title: 'C59360332',
  47. num: 6
  48. }
  49. ],
  50. modalName: null,
  51. };
  52. },
  53. methods: {
  54. goVideoDetail() {
  55. uni.navigateTo({
  56. url: '/pages/videoDetail/videoDetail',
  57. success: res => {},
  58. fail: () => {},
  59. complete: () => {}
  60. });
  61. },
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. </style>