index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <!-- z-paging插件:具体使用文档请看https://z-paging.zxlee.cn/ -->
  3. <z-paging
  4. :auto="false"
  5. :loading-more-enabled="false"
  6. :refresher-enabled="false"
  7. auto-show-back-to-top
  8. back-to-top-bottom="300rpx"
  9. :paging-style="{ paddingBottom: 'constant(safe-area-inset-bottom)', paddingBottom: 'env(safe-area-inset-bottom)' }"
  10. ref="paging"
  11. v-model="dataList"
  12. >
  13. <view class="couponIdx o-ptb-20 o-plr-20">
  14. <view class="content l-flex-RC o-plr-20 l-boxShadow o-mb-20" v-for="(item, index) in dataList" :key="index">
  15. <view class="leftCon o-ptb-40 o-plr-40">
  16. <view class="couponColor">
  17. <text class="c-text-12">¥</text>
  18. <text class="c-text-20 c-text-b">{{ item.value }}</text>
  19. </view>
  20. <view class="couponColor">抵用券</view>
  21. </view>
  22. <view class="couponColor rightCon o-ptb-40 o-pl-40">{{ item.lastUseDate | date('yyyy-mm-dd hh:MM:ss') }} 到期</view>
  23. </view>
  24. </view>
  25. </z-paging>
  26. </template>
  27. <script>
  28. // 引入辅助函数
  29. import { mapGetters } from 'vuex';
  30. export default {
  31. data() {
  32. return {
  33. dataList: []
  34. };
  35. },
  36. computed: {
  37. // 使用辅助函数
  38. ...mapGetters(['GETT_home_couponList'])
  39. },
  40. mounted() {
  41. // 首次进入需要调用方法加载
  42. this.$refs.paging.complete(this.GETT_home_couponList);
  43. }
  44. };
  45. </script>
  46. <style lang="scss" scoped>
  47. .couponIdx {
  48. .content {
  49. background-color: #fff5f4;
  50. .leftCon {
  51. border-right: 2px dashed #fff;
  52. }
  53. .couponColor {
  54. color: #ff9900;
  55. }
  56. }
  57. }
  58. </style>