history.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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>
  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. uni.setNavigationBarColor({
  40. frontColor: '#ffffff',
  41. backgroundColor: '#000000',
  42. });
  43. uni.setNavigationBarTitle({
  44. title: this.$t("tab.a2"),
  45. });
  46. },
  47. onReachBottom() {
  48. this.gameBetList()
  49. },
  50. methods: {
  51. gameBetList() {
  52. let that = this
  53. if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
  54. return
  55. }
  56. gameBetList({
  57. page: that.page,
  58. limit: that.limit,
  59. id: that.id,
  60. }).then(res => {
  61. let list = res.data.bet_log
  62. that.list = that.list.concat(list)
  63. that.page++
  64. if (list.length == that.limit) {
  65. that.loadingType = 'more'
  66. } else {
  67. that.loadingType = 'noMore'
  68. }
  69. that.loaded = true
  70. })
  71. }
  72. },
  73. };
  74. </script>
  75. <style lang="scss">
  76. .list {
  77. line-height: 1;
  78. border-bottom: 1px solid $border-color-light;
  79. .le {
  80. font-weight: bold;
  81. .qs {
  82. font-size: 20rpx;
  83. color: #ffffff;
  84. }
  85. .dy {
  86. font-size: 46rpx;
  87. color: #fdb242;
  88. }
  89. }
  90. .ri {
  91. .sx {
  92. font-size: 30rpx;
  93. font-weight: bold;
  94. color: #df5660;
  95. &.green{
  96. color: $color-green;
  97. }
  98. }
  99. }
  100. }
  101. </style>