node.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <view class="center">
  3. <view class="tab flex">
  4. <view class="left flex" @click="backIndex"><u-icon name="arrow-left" :size="40"></u-icon></view>
  5. <u-tabs-swiper
  6. class="tabBox"
  7. ref="uTabs"
  8. :height="70"
  9. :show-bar="false"
  10. active-color="#44969D"
  11. inactive-color="#6D7C88"
  12. :list="tabList"
  13. :current="current"
  14. @change="tabsChange"
  15. :is-scroll="false"
  16. ></u-tabs-swiper>
  17. </view>
  18. <swiper class="tabSwiper" :current="current" @animationfinish="transition">
  19. <swiper-item class="swiper-item">
  20. <scroll-view class="boxItem" scroll-y @scrolltolower="onreachBottom">
  21. <view class="item" v-for="ls in tabList[0].list">
  22. <view class="flex title">
  23. <view class="tip"></view>
  24. <view class="name">{{ ls.name }}</view>
  25. </view>
  26. <view class="itemConetnt">
  27. <view class="ls">
  28. 认购份额:
  29. <text class="text">{{ ls.num + ls.type }}</text>
  30. </view>
  31. <view class="ls">
  32. <text class="textInterval "></text>
  33. <text class="textInterval "></text>
  34. 价:
  35. <text class="text">1{{ ls.moneyType + '=' + ls.ratio + ls.type }}</text>
  36. </view>
  37. <view class="ls">
  38. 认购名额:
  39. <text class="text">{{ ls.limited }}</text>
  40. </view>
  41. <view class="ls">
  42. 认购总额:
  43. <text class="text">{{ ls.allMoney + ls.moneyType }}</text>
  44. </view>
  45. </view>
  46. <view class="lsButtom">立即认购</view>
  47. </view>
  48. <u-loadmore :status="tabList[0].loding"></u-loadmore>
  49. </scroll-view>
  50. </swiper-item>
  51. <swiper-item class="swiper-item">
  52. <scroll-view scroll-y @scrolltolower="onreachBottom">
  53. <view class="boxItem flex" style=" flex-wrap: wrap;">
  54. <view class="item1" v-for="ls in tabList[1].list">
  55. <view class="rightTip">进行中</view>
  56. <view class="ls1">
  57. <view class="name1">{{ ls.name }}</view>
  58. <view class="title1">{{ ls.mask }}</view>
  59. <view class="title1">
  60. 认购份额:{{ls.allMoney+ls.type}}
  61. <text></text>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <u-loadmore :status="tabList[1].loding"></u-loadmore>
  67. </scroll-view>
  68. </swiper-item>
  69. </swiper>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. current: 0, //当前选中的标签
  77. tabList: [
  78. {
  79. name: '节点认购',
  80. list: [
  81. {
  82. name: '节点认购第一期',
  83. num: 1000, //认购份额
  84. type: 'LALA', //认购货币类型
  85. ratio: 10, //认购比例
  86. limited: 20, //限购名额
  87. allMoney: 20, //认购总额
  88. moneyType: 'USDT' //兑换比例金额
  89. }
  90. ],
  91. pages: 1,
  92. limit: 10,
  93. loding: 'loadmore' //loading加载中 nomore没有数据
  94. },
  95. {
  96. name: '我的认购',
  97. pages: 1,
  98. limit: 10,
  99. list: [
  100. {
  101. name: '节点认购第一期',
  102. num: 1000, //认购份额
  103. type: 'LALA', //认购货币类型
  104. allMoney: 20 ,//认购总额
  105. mask:'当前第六关'
  106. },
  107. {
  108. name: '节点认购第一期',
  109. num: 1000, //认购份额
  110. type: 'LALA', //认购货币类型
  111. allMoney: 20 ,//认购总额
  112. mask:'当前第六关'
  113. },
  114. {
  115. name: '节点认购第一期',
  116. num: 1000, //认购份额
  117. type: 'LALA', //认购货币类型
  118. allMoney: 20 ,//认购总额
  119. mask:'当前第六关'
  120. },
  121. {
  122. name: '节点认购第一期',
  123. num: 1000, //认购份额
  124. type: 'LALA', //认购货币类型
  125. allMoney: 20 ,//认购总额
  126. mask:'当前第六关'
  127. }
  128. ],
  129. loding: 'loadmore' //loading加载中 nomore没有数据
  130. }
  131. ]
  132. };
  133. },
  134. //页面加载即刻发生
  135. onload() {},
  136. methods: {
  137. backIndex() {
  138. uni.switchTab({
  139. url: '/pages/index/index'
  140. });
  141. },
  142. // 内容框切换事件
  143. transition(e) {
  144. console.log(e);
  145. },
  146. // tab切换事件
  147. tabsChange(e) {
  148. this.current = e;
  149. },
  150. // 下拉到底部加载事件
  151. onreachBottom(e) {
  152. console.log(e);
  153. }
  154. }
  155. };
  156. </script>
  157. <style lang="scss">
  158. .tabBox {
  159. flex-grow: 1;
  160. }
  161. .center {
  162. height: 0;
  163. min-height: 100%;
  164. }
  165. .tab {
  166. background-color: #ffffff;
  167. align-items: stretch;
  168. .left {
  169. padding-left: 10rpx;
  170. padding-right: 20rpx;
  171. }
  172. }
  173. .tabSwiper {
  174. height: calc(100% - 70rpx);
  175. .swiper-item {
  176. padding: 30rpx;
  177. .boxItem {
  178. .item {
  179. background-color: #ffffff;
  180. line-height: 1;
  181. padding: 30rpx;
  182. margin-bottom: 30rpx;
  183. .title {
  184. justify-content: flex-start;
  185. padding-bottom: 30rpx;
  186. align-items: stretch;
  187. .tip {
  188. width: 7rpx;
  189. border-radius: 99rpx;
  190. background-color: $base-color;
  191. }
  192. .name {
  193. margin-left: 20rpx;
  194. font-size: 30rpx;
  195. font-weight: bold;
  196. color: $font-color-dark;
  197. }
  198. }
  199. .itemConetnt {
  200. padding: 20rpx 0;
  201. font-weight: bold;
  202. font-size: 28rpx;
  203. border-bottom: 1px solid $border-color-light;
  204. border-top: 1px solid $border-color-light;
  205. .ls {
  206. padding: 10rpx 0;
  207. color: $font-color-light;
  208. .textInterval {
  209. width: 0.5em;
  210. }
  211. .text {
  212. color: $font-color-dark;
  213. }
  214. }
  215. }
  216. .lsButtom {
  217. font-size: 30rpx;
  218. background-image: $bg-green-gradual;
  219. text-align: center;
  220. color: $font-color-white;
  221. padding: 30rpx 0;
  222. border-radius: 99rpx;
  223. margin: 20rpx 30rpx 0rpx 30rpx;
  224. }
  225. }
  226. .item1:nth-child(odd){
  227. margin-right: 30rpx;
  228. }
  229. .item1 {
  230. line-height: 1;
  231. .ls1{
  232. font-weight: bold;
  233. .name1{
  234. color: $font-color-dark;
  235. font-size: $font-base;
  236. margin-top: -10rpx;
  237. }
  238. .title1{
  239. margin-top: 15rpx;
  240. color: $font-color-light;
  241. font-size: 22rpx;
  242. }
  243. }
  244. .rightTip{
  245. color:$uni-color-primary ;
  246. text-align: right;
  247. font-size: 24rpx;
  248. }
  249. flex-grow: 1;
  250. min-width: 40%;
  251. margin-bottom: 30rpx;
  252. border-radius: 10rpx;
  253. background-color: #FFFFFF;
  254. border: 1px solid $uni-color-primary;
  255. padding: 10rpx 10rpx 30rpx 30rpx;
  256. }
  257. }
  258. }
  259. }
  260. </style>