EventItem.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="event-content">
  3. <view class="com-event-item" v-if="info">
  4. <view class="event-img" @click="onViewTheater">
  5. <image :src="info.imageUrl" class="img"/>
  6. </view>
  7. <view class="event-info">
  8. <view class="name" @click="onViewTheater">{{info.name}}</view>
  9. <view class="tip">时间:
  10. <block v-if="info.plan && info.plan.startTime"> {{info.plan.startDate}} 至 {{info.plan.endDate}}</block>
  11. <block v-else>暂无时间按排</block>
  12. </view>
  13. <view class="header" style=" height: 30px; width:100%; ">
  14. <view class="tags">
  15. <block v-for="(it,index) in info.tags">
  16. <view class="tag">{{it}}</view>
  17. </block>
  18. </view>
  19. </view>
  20. <view class="part_area" >
  21. <view class="parttip" >已报名:{{info.userList.length+info.underLineQty}} 人 </view>
  22. <!-- 报名会员头像 -->
  23. <!-- <view class="partic" v-if="info.userList.length > 0 && index < 6" v-for="(it,index) in info.userList " >
  24. <view><img :src="it.user.headerImg"></view>
  25. </view><view v-if="info.userList.length>6">...</view> -->
  26. </view>
  27. </view>
  28. <view class="event-btn">
  29. <view class="btn" @click="onViewTheater"><button class="btn-yy">{{ info.type === 1 ? '拼场' : (info.type === 2 ? '预约' : '') }}</button></view>
  30. <view class="qty">
  31. ¥{{info.price}}元/人
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. name:"EventItem",
  40. props:{
  41. info:{
  42. type:Object,
  43. default:()=>{
  44. return null;
  45. }
  46. }
  47. },
  48. data() {
  49. return {
  50. };
  51. },
  52. methods:{
  53. onViewPerformer(e){
  54. uni.navigateTo({
  55. url:'/pages/theater/chair-man/chair-man?id='+e
  56. })
  57. },
  58. onViewTheater(e){
  59. uni.navigateTo({
  60. url:'/pages/theater/movie/movie?id='+this.info.id
  61. })
  62. },
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. @import './EventItem.scss'
  68. </style>