history.vue 2.0 KB

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