node.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. .tabBox {
  178. flex-grow: 1;
  179. }
  180. .center {
  181. height: 0;
  182. min-height: 100%;
  183. }
  184. .tab {
  185. background-color: #ffffff;
  186. align-items: stretch;
  187. .left {
  188. padding-left: 10rpx;
  189. padding-right: 20rpx;
  190. }
  191. }
  192. .tabSwiper {
  193. height: calc(100% - 70rpx);
  194. .swiper-item {
  195. padding: 30rpx;
  196. .boxItem {
  197. .item {
  198. background-color: #ffffff;
  199. line-height: 1;
  200. padding: 30rpx;
  201. margin-bottom: 30rpx;
  202. .title {
  203. justify-content: flex-start;
  204. padding-bottom: 30rpx;
  205. align-items: stretch;
  206. .tip {
  207. width: 7rpx;
  208. border-radius: 99rpx;
  209. background-color: $base-color;
  210. }
  211. .name {
  212. margin-left: 20rpx;
  213. font-size: 30rpx;
  214. font-weight: bold;
  215. color: $font-color-dark;
  216. }
  217. }
  218. .itemConetnt {
  219. padding: 20rpx 0;
  220. font-weight: bold;
  221. font-size: 28rpx;
  222. border-bottom: 1px solid $border-color-light;
  223. border-top: 1px solid $border-color-light;
  224. .ls {
  225. padding: 10rpx 0;
  226. color: $font-color-light;
  227. .textInterval {
  228. width: 0.5em;
  229. }
  230. .text {
  231. color: $font-color-dark;
  232. }
  233. }
  234. }
  235. .lsButtom {
  236. font-size: 30rpx;
  237. background-image: $bg-green-gradual;
  238. text-align: center;
  239. color: $font-color-white;
  240. padding: 30rpx 0;
  241. border-radius: 99rpx;
  242. margin: 20rpx 30rpx 0rpx 30rpx;
  243. }
  244. }
  245. .item1:nth-child(odd){
  246. margin-right: 30rpx;
  247. }
  248. .item1 {
  249. line-height: 1;
  250. .ls1{
  251. font-weight: bold;
  252. .name1{
  253. color: $font-color-dark;
  254. font-size: $font-base;
  255. margin-top: -10rpx;
  256. }
  257. .title1{
  258. margin-top: 15rpx;
  259. color: $font-color-light;
  260. font-size: 22rpx;
  261. }
  262. }
  263. .rightTip{
  264. color:$uni-color-primary ;
  265. text-align: right;
  266. font-size: 24rpx;
  267. }
  268. flex-grow: 1;
  269. min-width: 40%;
  270. margin-bottom: 30rpx;
  271. border-radius: 10rpx;
  272. background-color: #FFFFFF;
  273. border: 1px solid $uni-color-primary;
  274. padding: 10rpx 10rpx 30rpx 30rpx;
  275. }
  276. }
  277. }
  278. }
  279. .psw-wrapper {
  280. width: 548rpx;
  281. height: 344rpx;
  282. background-color: #FFFFFF;
  283. .psw-title {
  284. width: 100%;
  285. font-size: 35rpx;
  286. padding: 43rpx 0 49rpx;
  287. text-align: center;
  288. font-weight: 800;
  289. }
  290. .psw-ipt {
  291. display: block;
  292. background-color: #dce3ed;
  293. height: 90rpx;
  294. width: 464rpx;
  295. padding-left: 30rpx;
  296. margin: 0 auto;
  297. font-size: 80rpx;
  298. }
  299. .psw-btn text{
  300. display: inline-block;
  301. text-align: center;
  302. width: 50%;
  303. padding-top: 29rpx;
  304. font-size: 35rpx;
  305. }
  306. .psw-qd {
  307. color:#5771DF;
  308. }
  309. }
  310. </style>