shareQrCode.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view class="all">
  3. <view class="list" v-for="item in list">
  4. <view class="flex padding-b-20">
  5. <view class="li">{{$t('set.a7')}}{{item.room.no}}{{$t('set.a8')}}</view>
  6. <view class="lis" v-if="item.result === 1">
  7. <view class="liss green">{{$t('enter.a5')}}</view>
  8. </view>
  9. <view class="lis" v-if="item.result === 0">
  10. <view class="liss red">{{$t('enter.a6')}}</view>
  11. </view>
  12. <view class="lis" v-if="item.status === 0">
  13. <view class="liss primary">{{$t('enter.a4')}}</view>
  14. </view>
  15. </view>
  16. <view class="listT">
  17. <!-- <view class="TT flex">
  18. <view class="lsT">{{$t('gameList.a2')}}</view>
  19. <view class="lisT">{{item.room.game.timebar}}</view>
  20. </view> -->
  21. <view class="TT flex">
  22. <view class="lsT">{{$t('gameList.a4')}}</view>
  23. <view class="lisT">{{item.num}}U</view>
  24. </view>
  25. <view class="TT flex">
  26. <view class="lsT">{{$t('gameList.a7')}}</view>
  27. <view class="lisT green" v-if="item.bet==1">{{ $t("enter.u6") }}</view>
  28. <view class="lisT red" v-if="item.bet==2">{{ $t("enter.u4") }}</view>
  29. <view class="lisT green" v-if="item.bet==3">{{ $t("enter.u5") }}</view>
  30. <view class="lisT red" v-if="item.bet==4">{{ $t("enter.u7") }}</view>
  31. </view>
  32. <view class="TT flex">
  33. <view class="lsT">{{$t('gameList.a8')}}</view>
  34. <view class="lisT">{{item.get}}U</view>
  35. </view>
  36. <view class="TT flex">
  37. <view class="lsT">{{$t('gameList.a9')}}</view>
  38. <view class="flex-start">
  39. <template v-for="it in item.room.arr " v-if="it.value==1">
  40. <view class="lisT green" v-if="it.type==1">{{ $t("enter.u6") }}</view>
  41. <view class="lisT green" v-if="it.type==3">{{ $t("enter.u5") }}</view>
  42. <view class="lisT red" v-if="it.type==2">{{ $t("enter.u4") }}</view>
  43. <view class="lisT red" v-if="it.type==4">{{ $t("enter.u7") }}</view>
  44. </template>
  45. </view>
  46. </view>
  47. <view class="TT flex">
  48. <view class="lsT">{{$t('gameList.a10')}}</view>
  49. <view class="lisT flex" v-if="item.room.result_info">
  50. <image v-for="ls in item.room.result_info" class="dice"
  51. :src="`../../static/img/dice${ls}.png`" mode="scaleToFill"></image>
  52. </view>
  53. </view>
  54. <view class="TT flex">
  55. <view class="lsT">{{$t('gameList.a5')}}</view>
  56. <view class="lisT">{{item.open_time}}</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. gameBetList
  65. } from '@/api/game.js'
  66. import {
  67. getTime
  68. } from '@/utils/rocessor.js';
  69. export default {
  70. data() {
  71. return {
  72. id: 0,
  73. page: 1,
  74. limit: 10,
  75. list: []
  76. };
  77. },
  78. onLoad() {
  79. this.gameBetList()
  80. uni.setNavigationBarTitle({
  81. title: this.$t("tab.a9"),
  82. });
  83. },
  84. onReachBottom() {
  85. this.gameBetList()
  86. },
  87. //下拉刷新
  88. methods: {
  89. // 互娱记录
  90. gameBetList() {
  91. let that = this
  92. if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
  93. return
  94. }
  95. gameBetList({
  96. page: that.page,
  97. limit: that.limit,
  98. id: that.id,
  99. }).then(res => {
  100. let list = res.data.bet_log.map((res) => {
  101. res.num = +res.num;
  102. res.get = +res.get;
  103. res.room.result_info = res.room.result_info.split(",");
  104. let result = res.room.result
  105. if (result) {
  106. let arr = [];
  107. const ar = result.split(",")
  108. for (let i = 0; i < ar.length; i++) {
  109. const s = ar[i].split(':');
  110. arr.push({
  111. type: s[0],
  112. value: s[1]
  113. })
  114. }
  115. res.room.arr = arr;
  116. }
  117. res.open_time = getTime(res.open_time);
  118. return res
  119. })
  120. that.list = that.list.concat(list)
  121. console.log('1111111', list);
  122. that.page++
  123. if (list.length == that.limit) {
  124. that.loadingType = 'more'
  125. } else {
  126. that.loadingType = 'noMore'
  127. }
  128. that.loaded = true
  129. })
  130. }
  131. }
  132. };
  133. </script>
  134. <style lang="scss">
  135. .all {
  136. color: #FFFFFF;
  137. padding: 30rpx;
  138. line-height: 1;
  139. }
  140. .list {
  141. background: #191A1F;
  142. box-shadow: 0rpx 5rpx 24rpx 0rpx rgba(4, 0, 0, 0.06);
  143. border-radius: 15rpx;
  144. padding: 30rpx;
  145. margin-bottom: 30rpx;
  146. .li {
  147. font-size: $font-lg;
  148. font-weight: bold;
  149. }
  150. .lis {
  151. .liss {
  152. border-radius: 5rpx;
  153. padding: 10rpx 20rpx;
  154. font-size: 22rpx;
  155. font-weight: 500;
  156. &.red {
  157. background: $color-yellow;
  158. }
  159. &.green {
  160. background: $color-green;
  161. }
  162. &.primary {
  163. background: #01ebf6;
  164. }
  165. }
  166. }
  167. }
  168. .listT {
  169. .TT {
  170. margin-top: 20rpx;
  171. .lsT {
  172. font-weight: 500;
  173. color: #999999;
  174. font-size: $font-base;
  175. min-width: 140rpx;
  176. }
  177. .lisT {
  178. font-size: $font-lg;
  179. font-weight: bold;
  180. .dice {
  181. width: 54rpx;
  182. height: 54rpx;
  183. margin-left: 10rpx;
  184. }
  185. &.red {
  186. color: #df5660;
  187. }
  188. &.green {
  189. color: $color-green;
  190. }
  191. }
  192. }
  193. }
  194. </style>