index.vue 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="page HuiShengHuo">
  3. <ScrollY :IsRefreshing="IsRefreshing" @Refresh="Refresh">
  4. <!-- banner -->
  5. <view class="Banner">
  6. <view>
  7. <BannerSwiper></BannerSwiper>
  8. </view>
  9. </view>
  10. <!-- 活动照片墙 -->
  11. <view class="PhotoList">
  12. <view class="flex-h">
  13. <view class="flex-item">
  14. <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/huodongzhaopianqiang.png"></image>
  15. </view>
  16. <navigator url="./PhotoList/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
  17. </view>
  18. <view class="ListContainer">
  19. <scroll-view scroll-x="true">
  20. <view class="List">
  21. <view v-for="(item, index) in 10" :key="index">
  22. <view></view>
  23. </view>
  24. </view>
  25. </scroll-view>
  26. </view>
  27. </view>
  28. <!-- 精彩活动 -->
  29. <view class="ActivityList">
  30. <view class="flex-h">
  31. <view class="flex-item">
  32. <image mode="heightFix" src="https://cjgw.oss-cn-hangzhou.aliyuncs.com/ygcxxfb/image/jingcaihuodong.png"></image>
  33. </view>
  34. <navigator url="./ActivityList/index" hover-class="other-navigator-hover" class="More">更多 <text class="iconfont iconjiantouright"></text></navigator>
  35. </view>
  36. <view class="List">
  37. <view class="Item" v-for="(item, index) in 20" :key="index">
  38. <view class="Img"></view>
  39. <view class="Info">
  40. <text>活动名称</text>
  41. <view class="flex-h">
  42. <text class="flex-item">参与截止时间:2020-08-20 16:00</text>
  43. <navigator url="./ActivityList/ActivityDetail/index" hover-class="other-navigator-hover" class="Btn">立即报名</navigator>
  44. <navigator url="./ActivityList/ActivityDetail/index" hover-class="other-navigator-hover" class="Btn">立即投票</navigator>
  45. <view>已结束</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </ScrollY>
  52. </view>
  53. </template>
  54. <script>
  55. import ScrollY from '../../components/ScrollY/index'
  56. import BannerSwiper from '../../components/BannerSwiper/index'
  57. import { createNamespacedHelpers } from 'vuex'
  58. const { mapState: mapUserState, mapActions: mapUserActions } = createNamespacedHelpers('user')
  59. export default {
  60. name: 'HuiShengHuo',
  61. data () {
  62. return {
  63. IsRefreshing: false,
  64. DataLock: false
  65. }
  66. },
  67. computed: {
  68. ...mapUserState({
  69. UserPlaylist: x => x.UserPlaylist
  70. })
  71. },
  72. components: {
  73. ScrollY,
  74. BannerSwiper
  75. },
  76. created () {
  77. this.Init()
  78. },
  79. methods: {
  80. ...mapUserActions([
  81. 'GetUserPlaylist'
  82. ]),
  83. Init () {
  84. // this.GetUserPlaylist({ queryData: { accountId: 5, pageNum: 1, pageSize: 1000 } }).then((res) => {
  85. // console.log(this.UserPlaylist)
  86. // })
  87. },
  88. LinkTo (url) {
  89. wx.navigateTo({ url })
  90. },
  91. Refresh (e) {
  92. if (this.DataLock) return
  93. this.DataLock = true
  94. this.IsRefreshing = true
  95. setTimeout(() => {
  96. this.IsRefreshing = false
  97. this.DataLock = false
  98. }, 1000)
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss">
  104. @import "page.scss";
  105. </style>