node.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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" @click="buy()">立即认购</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. <u-popup v-model="show" mode="center" width="548rpx" border-radius="14">
  71. <view class="psw-wrapper">
  72. <view class="psw-title">请输入支付密码</view>
  73. <input type="password" v-model="password" class="psw-ipt" />
  74. <view class="psw-btn">
  75. <text @click="cancel">取消</text>
  76. <text class="psw-qd" @click="pswQd">确定</text>
  77. </view>
  78. </view>
  79. </u-popup>
  80. </view>
  81. </template>
  82. <script>
  83. export default {
  84. data() {
  85. return {
  86. show: false,
  87. password: '',
  88. current: 0, //当前选中的标签
  89. tabList: [
  90. {
  91. name: '节点认购',
  92. list: [
  93. {
  94. name: '节点认购第一期',
  95. num: 1000, //认购份额
  96. type: 'LALA', //认购货币类型
  97. ratio: 10, //认购比例
  98. limited: 20, //限购名额
  99. allMoney: 20, //认购总额
  100. moneyType: 'USDT' //兑换比例金额
  101. }
  102. ],
  103. pages: 1,
  104. limit: 10,
  105. loding: 'loadmore' //loading加载中 nomore没有数据
  106. },
  107. {
  108. name: '我的认购',
  109. pages: 1,
  110. limit: 10,
  111. list: [
  112. {
  113. name: '节点认购第一期',
  114. num: 1000, //认购份额
  115. type: 'LALA', //认购货币类型
  116. allMoney: 20, //认购总额
  117. mask: '当前第六关'
  118. },
  119. {
  120. name: '节点认购第一期',
  121. num: 1000, //认购份额
  122. type: 'LALA', //认购货币类型
  123. allMoney: 20, //认购总额
  124. mask: '当前第六关'
  125. },
  126. {
  127. name: '节点认购第一期',
  128. num: 1000, //认购份额
  129. type: 'LALA', //认购货币类型
  130. allMoney: 20, //认购总额
  131. mask: '当前第六关'
  132. },
  133. {
  134. name: '节点认购第一期',
  135. num: 1000, //认购份额
  136. type: 'LALA', //认购货币类型
  137. allMoney: 20, //认购总额
  138. mask: '当前第六关'
  139. }
  140. ],
  141. loding: 'loadmore' //loading加载中 nomore没有数据
  142. }
  143. ]
  144. };
  145. },
  146. //页面加载即刻发生
  147. onload() {},
  148. methods: {
  149. backIndex() {
  150. uni.switchTab({
  151. url: '/pages/index/index'
  152. });
  153. },
  154. // 内容框切换事件
  155. transition(e) {
  156. console.log(e);
  157. this.current = e.detail.current;
  158. },
  159. // tab切换事件
  160. tabsChange(e) {
  161. this.current = e;
  162. },
  163. // 下拉到底部加载事件
  164. onreachBottom(e) {
  165. console.log(e);
  166. },
  167. buy() {
  168. this.show = true;
  169. },
  170. cancel() {
  171. this.show = false;
  172. }
  173. }
  174. };
  175. </script>
  176. <style lang="scss">
  177. page {
  178. height: 100%;
  179. }
  180. .tabBox {
  181. flex-grow: 1;
  182. }
  183. .center {
  184. height: 0;
  185. min-height: 100%;
  186. }
  187. .tab {
  188. background-color: #ffffff;
  189. align-items: stretch;
  190. .left {
  191. padding-left: 10rpx;
  192. padding-right: 20rpx;
  193. }
  194. }
  195. .tabSwiper {
  196. height: calc(100% - 70rpx);
  197. .swiper-item {
  198. padding: 30rpx;
  199. .boxItem {
  200. .item {
  201. background-color: #ffffff;
  202. line-height: 1;
  203. padding: 30rpx;
  204. margin-bottom: 30rpx;
  205. .title {
  206. justify-content: flex-start;
  207. padding-bottom: 30rpx;
  208. align-items: stretch;
  209. .tip {
  210. width: 7rpx;
  211. border-radius: 99rpx;
  212. background-color: $base-color;
  213. }
  214. .name {
  215. margin-left: 20rpx;
  216. font-size: 30rpx;
  217. font-weight: bold;
  218. color: $font-color-dark;
  219. }
  220. }
  221. .itemConetnt {
  222. padding: 20rpx 0;
  223. font-weight: bold;
  224. font-size: 28rpx;
  225. border-bottom: 1px solid $border-color-light;
  226. border-top: 1px solid $border-color-light;
  227. .ls {
  228. padding: 10rpx 0;
  229. color: $font-color-light;
  230. .textInterval {
  231. width: 0.5em;
  232. }
  233. .text {
  234. color: $font-color-dark;
  235. }
  236. }
  237. }
  238. .lsButtom {
  239. font-size: 30rpx;
  240. background-image: $bg-green-gradual;
  241. text-align: center;
  242. color: $font-color-white;
  243. padding: 30rpx 0;
  244. border-radius: 99rpx;
  245. margin: 20rpx 30rpx 0rpx 30rpx;
  246. }
  247. }
  248. .item1:nth-child(odd) {
  249. margin-right: 30rpx;
  250. }
  251. .item1 {
  252. line-height: 1;
  253. background: url(../../static/img/rengouBg.png) no-repeat;
  254. background-position: right bottom;
  255. background-size: 140rpx 115rpx;
  256. flex-grow: 1;
  257. min-width: 40%;
  258. margin-bottom: 30rpx;
  259. border-radius: 15rpx;
  260. background-color: #ffffff;
  261. border: 1px solid $uni-color-primary;
  262. padding: 15rpx 10rpx 35rpx 30rpx;
  263. .ls1 {
  264. font-weight: bold;
  265. .name1 {
  266. color: $font-color-dark;
  267. font-size: $font-base;
  268. margin-top: -10rpx;
  269. }
  270. .title1 {
  271. margin-top: 15rpx;
  272. color: $font-color-light;
  273. font-size: 22rpx;
  274. }
  275. }
  276. .rightTip {
  277. color: $uni-color-primary;
  278. text-align: right;
  279. font-size: 24rpx;
  280. }
  281. }
  282. }
  283. }
  284. }
  285. .psw-wrapper {
  286. width: 548rpx;
  287. height: 344rpx;
  288. background-color: #FFFFFF;
  289. .psw-title {
  290. width: 100%;
  291. font-size: 35rpx;
  292. padding: 43rpx 0 49rpx;
  293. text-align: center;
  294. font-weight: 800;
  295. }
  296. .psw-ipt {
  297. display: block;
  298. background-color: #dce3ed;
  299. height: 90rpx;
  300. width: 464rpx;
  301. padding-left: 30rpx;
  302. margin: 0 auto;
  303. font-size: 80rpx;
  304. }
  305. .psw-btn text{
  306. display: inline-block;
  307. text-align: center;
  308. width: 50%;
  309. padding-top: 29rpx;
  310. font-size: 35rpx;
  311. }
  312. .psw-qd {
  313. color:#45969B;
  314. }
  315. }
  316. </style>