history.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view class="all padding-v-30 padding-c-30">
  3. <view class="list padding-v-10 flex" v-for="(item,ind) in list" :key="ind">
  4. <view class="le">
  5. <view class="qs padding-b-10">第{{item.room.no}}期</view>
  6. <view class="dy padding-b-10" v-if="item.room.result_info">{{item.room.result_info.c*1}}</view>
  7. </view>
  8. <view class="ri">
  9. <view class="sx green" v-if="item.bet==1">{{ $t("enter.u6") }}</view>
  10. <view class="sx green" v-if="item.bet==3">{{ $t("enter.u5") }}</view>
  11. <view class="sx " v-if="item.bet==2">{{ $t("enter.u4") }}</view>
  12. <view class="sx" v-if="item.bet==4">{{ $t("enter.u7") }}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import {
  19. gameBetList
  20. } from "@/api/game.js";
  21. import empty from '@/components/empty';
  22. export default {
  23. components: {
  24. empty
  25. },
  26. data() {
  27. return {
  28. id: '',
  29. page: 1,
  30. limit: 10,
  31. loadingType: 'more',
  32. loaded: false,
  33. list: []
  34. }
  35. },
  36. onLoad(option) {
  37. this.id = option.id;
  38. this.gameBetList()
  39. },
  40. onReachBottom() {
  41. this.gameBetList()
  42. },
  43. methods: {
  44. gameBetList() {
  45. let that = this
  46. if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
  47. return
  48. }
  49. gameBetList({
  50. page: that.page,
  51. limit: that.limit,
  52. id: that.id,
  53. }).then(res => {
  54. let list = res.data.bet_log
  55. that.list = that.list.concat(list)
  56. that.page++
  57. if (list.length == that.limit) {
  58. that.loadingType = 'more'
  59. } else {
  60. that.loadingType = 'noMore'
  61. }
  62. that.loaded = true
  63. })
  64. }
  65. },
  66. };
  67. </script>
  68. <style lang="scss">
  69. .list {
  70. line-height: 1;
  71. border-bottom: 1px solid $border-color-light;
  72. .le {
  73. font-weight: bold;
  74. .qs {
  75. font-size: 20rpx;
  76. color: #ffffff;
  77. }
  78. .dy {
  79. font-size: 46rpx;
  80. color: #fdb242;
  81. }
  82. }
  83. .ri {
  84. .sx {
  85. font-size: 30rpx;
  86. font-weight: bold;
  87. color: #df5660;
  88. &.green{
  89. color: $color-green;
  90. }
  91. }
  92. }
  93. }
  94. </style>