history.vue 2.1 KB

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