cinemalist.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view>
  3. <loadSke :loading='cinemaLoading' :list='cinemaList'>
  4. <view class="cinema-box" v-for="(item,index) in cinemaList" :key='index' @click='goPage(`/pages/cinema/schedulelist?cinemaId=${item.cinemaId}&filmId=${filmId}`)'>
  5. <view class="tit">
  6. <text>{{item.cinemaName}}</text>
  7. <text class="text-2">{{item.distance}}</text>
  8. </view>
  9. <text class="address">{{item.address}}</text>
  10. </view>
  11. </loadSke>
  12. </view>
  13. </template>
  14. <script>
  15. import loadSke from '@/components/skeleton/index/index.vue'
  16. import {
  17. getCinemaList,
  18. getShowList
  19. } from '@/api/cinema.js'
  20. export default {
  21. components: {
  22. loadSke
  23. },
  24. data: () => ({
  25. cinemaList: [],
  26. cinemaLoading: true,
  27. filmId: null,
  28. cityId: null,
  29. location: null
  30. }),
  31. onLoad: function(option) {
  32. this.filmId = option.filmId
  33. this.cityId = option.cityId
  34. this.location = option.location.split(',')
  35. },
  36. mounted() {
  37. this.init()
  38. },
  39. methods: {
  40. init() {
  41. getShowList({
  42. cityId: this.cityId,
  43. filmId: this.filmId,
  44. latitude: this.location[1],
  45. longitude: this.location[0]
  46. }).then(res => {
  47. this.cinemaList = res.data.data.list
  48. this.cinemaLoading = false
  49. })
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .cinema-box {
  56. padding: 30rpx 0;
  57. margin: 0 30rpx;
  58. border-bottom: 1rpx solid #E8E8E8;
  59. .tit {
  60. display: flex;
  61. justify-content: space-between;
  62. .text-1 {
  63. font-size: 30rpx;
  64. color: #0F0404;
  65. }
  66. .text-2 {
  67. font-size: 26rpx;
  68. color: #999999;
  69. white-space: nowrap;
  70. }
  71. }
  72. .address {
  73. font-size: 26rpx;
  74. color: #666666;
  75. }
  76. }
  77. </style>