blindBox.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="page">
  3. <view class="listBox">
  4. <view class="item"v-for="(item,index) in list">
  5. <view class="titleBox flex-start">
  6. <image class="tipImg margin-r-10" src="../../static/index/game/mhtip.png" mode="scaleToFill">
  7. </image>
  8. <text>盲盒一号</text>
  9. </view>
  10. <view class="itemListTypeBox">
  11. <view class="listItem flex">
  12. <view class="titleName">
  13. 状态
  14. </view>
  15. <view class="typeNum">
  16. <text class="strongText">探索中</text>
  17. </view>
  18. </view>
  19. <view class="listItem flex">
  20. <view class="titleName">
  21. 已探索
  22. </view>
  23. <view class="typeNum">
  24. 30天
  25. </view>
  26. </view>
  27. <view class="listItem flex">
  28. <view class="titleName">
  29. 已产出
  30. </view>
  31. <view class="typeNum">
  32. <text class="strongText margin-r-10">20</text>
  33. 矿石
  34. </view>
  35. </view>
  36. <view class="listItem flex">
  37. <view class="titleName">
  38. 待产出
  39. </view>
  40. <view class="typeNum">
  41. <text class="strongText margin-r-10">10</text>
  42. 矿石
  43. </view>
  44. </view>
  45. <view class="listItem flex">
  46. <view class="titleName">
  47. 购买时间
  48. </view>
  49. <view class="typeNum">
  50. 2024.05.13 08:00:30
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <uni-load-more :status="loadingType"></uni-load-more>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. action: 0,
  64. page: 1,
  65. limit: 10,
  66. loadingType: 'more',
  67. list: [{
  68. hide: false,
  69. },
  70. {
  71. hide: false,
  72. },
  73. {
  74. hide: false,
  75. },
  76. {
  77. hide: false,
  78. },
  79. {
  80. hide: false,
  81. },
  82. {
  83. hide: false,
  84. },
  85. {
  86. hide: false,
  87. },
  88. {
  89. hide: false,
  90. },
  91. {
  92. hide: false,
  93. },
  94. {
  95. hide: false,
  96. },
  97. ],
  98. show: false,
  99. // 当前选中的对象
  100. actionItem: {}
  101. };
  102. },
  103. onLoad(options) {
  104. },
  105. onShow() {},
  106. methods: {
  107. // 打开弹窗
  108. openAlert(item) {
  109. this.show = true;
  110. this.actionItem = item;
  111. },
  112. tabList(index) {
  113. this.action = index;
  114. this.loadData('tabChange')
  115. },
  116. loadData(source) {
  117. //这里是将订单挂载到tab列表下
  118. let navItem =this;
  119. let state = navItem.state;
  120. if (source === 'tabChange' && navItem.loaded === true) {
  121. //tab切换只有第一次需要加载数据
  122. return;
  123. }
  124. if (navItem.loadingType === 'loading') {
  125. //防止重复加载
  126. return;
  127. }
  128. if (navItem.loadingType === 'noMore') {
  129. //防止重复加载
  130. return;
  131. }
  132. // 修改当前对象状态为加载中
  133. navItem.loadingType = 'loading';
  134. // orderList({
  135. // type: state,
  136. // page: navItem.page,
  137. // limit: navItem.limit
  138. // })
  139. // .then(({
  140. // data
  141. // }) => {
  142. // let arr = data.map(e => {
  143. // let b = this.orderStateExp(e.status);
  144. // e.stateTip = b.stateTip;
  145. // e.stateTipColor = b.stateTipColor;
  146. // return e;
  147. // });
  148. // navItem.list = navItem.list.concat(arr);
  149. // // console.log(navItem.list);
  150. // navItem.page++;
  151. // if (navItem.limit == data.length) {
  152. // //判断是否还有数据, 有改为 more, 没有改为noMore
  153. // navItem.loadingType = 'more';
  154. // return;
  155. // } else {
  156. // //判断是否还有数据, 有改为 more, 没有改为noMore
  157. // navItem.loadingType = 'noMore';
  158. // }
  159. // uni.hideLoading();
  160. // this.$set(navItem, 'loaded', true);
  161. // })
  162. // .catch(e => {
  163. // console.log(e);
  164. // });
  165. },
  166. }
  167. };
  168. </script>
  169. <style lang="scss" scoped>
  170. .page {
  171. min-height: calc(100vh);
  172. margin-top: -44px;
  173. padding-top: 44px;
  174. line-height: 1;
  175. background-image: url("../../static/user/user-bg.png");
  176. background-repeat: no-repeat;
  177. background-size: 100% auto;
  178. background-color: rgb(255, 255, 255);
  179. }
  180. .item {
  181. margin: 0 30rpx 30rpx 30rpx;
  182. border-radius: 20rpx;
  183. background-color: #FFF;
  184. border: 1px solid #C1C1C1;
  185. padding: 20rpx 0;
  186. color: #222222;
  187. .titleBox {
  188. font-weight: bold;
  189. font-size: 33rpx;
  190. padding: 0rpx 30rpx;
  191. .tipImg {
  192. width: 65rpx;
  193. height: 60rpx;
  194. }
  195. }
  196. .itemListTypeBox {
  197. font-weight: 500;
  198. font-size: 28rpx;
  199. padding-bottom: 10rpx;
  200. .listItem {
  201. padding: 0rpx 30rpx;
  202. margin-top: 20rpx;
  203. .typeNum {
  204. font-weight: bold;
  205. .strongText {
  206. color: #5E379E;
  207. }
  208. }
  209. }
  210. }
  211. }
  212. </style>