myNote.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <view class="center">
  3. <view class="bg"></view>
  4. <view class="zong flex">
  5. <view class="info">
  6. <view class="info-num">{{ yesterday || '0.00' }}</view>
  7. <view class="info-font">昨天释放</view>
  8. </view>
  9. <view class="info">
  10. <view class="info-num">{{ all || '0.00' }}</view>
  11. <view class="info-font">累计释放</view>
  12. </view>
  13. </view>
  14. <view class="zongbox flex">
  15. <view class="zongbox-left">昨日</view>
  16. <view class="info">
  17. <view class="num">{{ yesterday_award }}</view>
  18. <view class="info-font">昨日门票分红</view>
  19. </view>
  20. <view class="info">
  21. <view class="num">{{ yesterday_service }}</view>
  22. <view class="info-font">手续费分红</view>
  23. </view>
  24. <view class="info">
  25. <view class="num">0</view>
  26. <view class="info-font">其他分红</view>
  27. </view>
  28. </view>
  29. <view class="zongbox flex">
  30. <view class="zongbox-left">历史</view>
  31. <view class="info">
  32. <view class="num">{{ all_award }}</view>
  33. <view class="info-font">历史门票分红</view>
  34. </view>
  35. <view class="info">
  36. <view class="num">{{ all_service }}</view>
  37. <view class="info-font">手续费分红</view>
  38. </view>
  39. <view class="info">
  40. <view class="num">0</view>
  41. <view class="info-font">其他分红</view>
  42. </view>
  43. </view>
  44. <view class="join">
  45. <view class="xian"></view>
  46. <view class="join-font">我的节点</view>
  47. </view>
  48. <view class="tabSwiper">
  49. <view class="swiper-item">
  50. <scroll-view scroll-y @scrolltolower="onreachBottom">
  51. <view class="boxItem flex" style=" flex-wrap: wrap;">
  52. <view class="item1" v-for="ls in tabList">
  53. <view class="ls1">
  54. <view class="name1">{{ ls.plan.plan_name }}</view>
  55. </view>
  56. <view class="item-main">
  57. <view class="main-top flex">
  58. <view class="top-left">认购份数:{{ ls.buy_num * 1 }}</view>
  59. <view class="top-left">释放天数:{{ ls.release_time_now }}</view>
  60. <!-- <view class="top-right">累计释放:20</view> -->
  61. </view>
  62. <view class="main-top flex"><!-- <view class="top-right">累计分红:20</view> --></view>
  63. </view>
  64. </view>
  65. </view>
  66. <!-- <u-loadmore :status="loding"></u-loadmore> -->
  67. </scroll-view>
  68. </view>
  69. </view>
  70. <view class="join">
  71. <view class="xian"></view>
  72. <view class="join-font">其他节点</view>
  73. </view>
  74. <view class="box">
  75. <view class="boxItem flex" style=" flex-wrap: wrap; width: 50%;">
  76. <view class="item1" v-for="ls in pointList">
  77. <view class="ls1">
  78. <view class="name1">{{ ls.plan_name }}</view>
  79. </view>
  80. <view class="item-main">
  81. <view class="main-top">已加入人数:{{ ls.request_num * 1 }}</view>
  82. <view class="main-top">合伙总人数:{{ ls.all_stock * 1 }}</view>
  83. <view class="main-top">分红总量:{{ ls.release_money * 1 }}</view>
  84. <!-- <view class="main-top">时间:2021年9月2日</view> -->
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- </swiper-item>
  90. </swiper> -->
  91. <!-- <u-popup v-model="show" mode="center" width="548rpx" border-radius="14">
  92. <view class="psw-wrapper">
  93. <view class="psw-title">请输入支付密码</view>
  94. <input type="password" v-model="password" class="psw-ipt" />
  95. <view class="psw-btn">
  96. <text @click="cancel">取消</text>
  97. <text class="psw-qd" @click="pswQd">确定</text>
  98. </view>
  99. </view>
  100. </u-popup> -->
  101. </view>
  102. </template>
  103. <script>
  104. import { myPiont } from '@/api/user.js';
  105. import { getPoint } from '@/api/set.js';
  106. export default {
  107. data() {
  108. return {
  109. show: false,
  110. password: '',
  111. current: 0, //当前选中的标签
  112. tabList: [],
  113. pointList: [],
  114. loding: 'more',
  115. all: '', //累计释放
  116. yesterday: '', //昨天释放
  117. all_award: '', //历史门票分红
  118. yesterday_award: '', //昨日门票分红
  119. all_service: 0, //历史手续费分红
  120. yesterday_service: '' //昨日手续费分红
  121. };
  122. },
  123. //页面加载即刻发生
  124. onShow() {
  125. this.loadData();
  126. },
  127. methods: {
  128. async loadData() {
  129. uni.showLoading({
  130. title: '加载中'
  131. });
  132. myPiont({ page: 1, limit: 10000 }).then(({ data }) => {
  133. this.yesterday = data.yesterday * 1;
  134. this.yesterday_award = (data.yesterday_award * 1).toFixed(4);
  135. this.all = data.all * 1;
  136. this.all_award = (data.all_award * 1).toFixed(4);
  137. if (data.all_service.length != 0) {
  138. for (let i = 0; i < data.all_service.length; i++) {
  139. let j = data.all_service[i].sum * 1;
  140. this.all_service = this.all_service + j;
  141. console.log(j, '1111');
  142. }
  143. this.all_service = (this.all_service * 1).toFixed(4);
  144. } else {
  145. this.all_service = 0;
  146. }
  147. if (data.yesterday_service.length != 0) {
  148. for (let i = 0; i < data.yesterday_service.length; i++) {
  149. this.yesterday_service += data.yesterday_service[i].sum;
  150. }
  151. } else {
  152. this.yesterday_service = 0;
  153. }
  154. this.tabList = data.list;
  155. getPoint().then(({ data }) => {
  156. this.pointList = data;
  157. uni.hideLoading();
  158. });
  159. });
  160. },
  161. // 下拉到底部加载事件
  162. onreachBottom(e) {
  163. console.log(e);
  164. }
  165. }
  166. };
  167. </script>
  168. <style lang="scss">
  169. page {
  170. height: 100%;
  171. }
  172. .tabBox {
  173. flex-grow: 1;
  174. }
  175. .center {
  176. height: 0;
  177. min-height: 100%;
  178. }
  179. .bg {
  180. width: 750rpx;
  181. height: 248rpx;
  182. background: linear-gradient(30deg, #2e58ff, #33eeff);
  183. border-bottom-left-radius: 150rpx;
  184. border-bottom-right-radius: 150rpx;
  185. }
  186. .zong {
  187. width: 690rpx;
  188. height: 181rpx;
  189. background: #ffffff;
  190. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  191. border-radius: 20rpx;
  192. margin: -150rpx auto 0;
  193. justify-content: space-around;
  194. padding: 0rpx 36rpx;
  195. }
  196. .info {
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. .info-num {
  201. font-size: 50rpx;
  202. font-family: PingFang SC;
  203. font-weight: bold;
  204. color: #0f253a;
  205. }
  206. .num {
  207. font-size: 40rpx;
  208. font-family: PingFang SC;
  209. font-weight: bold;
  210. color: #0f253a;
  211. }
  212. .info-font {
  213. font-size: 28rpx;
  214. font-family: PingFang SC;
  215. font-weight: bold;
  216. color: #6d7c88;
  217. }
  218. }
  219. .zongbox {
  220. width: 690rpx;
  221. height: auto;
  222. background: #ffffff;
  223. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  224. border-radius: 20rpx;
  225. margin: 20rpx auto 0;
  226. justify-content: space-around;
  227. padding: 36rpx 10rpx 36rpx 60rpx;
  228. position: relative;
  229. .zongbox-left {
  230. padding-top: 30rpx;
  231. position: absolute;
  232. left: 0;
  233. top: 0;
  234. width: 50rpx;
  235. text-align: center;
  236. height: 100%;
  237. color: #fff;
  238. line-height: 1.5;
  239. background: linear-gradient(0deg, #2e58ff, #32c6ff);
  240. border-top-left-radius: 20rpx;
  241. border-bottom-left-radius: 20rpx;
  242. }
  243. }
  244. .tab {
  245. background-color: #ffffff;
  246. align-items: stretch;
  247. .left {
  248. padding-left: 10rpx;
  249. padding-right: 20rpx;
  250. }
  251. }
  252. .tabSwiper {
  253. .swiper-item {
  254. padding: 30rpx 30rpx 0;
  255. }
  256. }
  257. .box {
  258. width: 100%;
  259. padding: 30rpx;
  260. }
  261. .boxItem {
  262. .item {
  263. background-color: #ffffff;
  264. line-height: 1;
  265. padding: 30rpx;
  266. margin-bottom: 30rpx;
  267. .title {
  268. justify-content: flex-start;
  269. padding-bottom: 30rpx;
  270. align-items: stretch;
  271. .tip {
  272. width: 7rpx;
  273. border-radius: 99rpx;
  274. background-color: $base-color;
  275. }
  276. .name {
  277. margin-left: 20rpx;
  278. font-size: 30rpx;
  279. font-weight: bold;
  280. color: $font-color-dark;
  281. }
  282. }
  283. .itemConetnt {
  284. padding: 20rpx 0;
  285. font-weight: bold;
  286. font-size: 28rpx;
  287. border-bottom: 1px solid $border-color-light;
  288. border-top: 1px solid $border-color-light;
  289. .ls {
  290. padding: 10rpx 0;
  291. color: $font-color-light;
  292. .textInterval {
  293. width: 0.5em;
  294. }
  295. .text {
  296. color: $font-color-dark;
  297. }
  298. }
  299. }
  300. .lsButtom {
  301. font-size: 30rpx;
  302. background-image: $bg-green-gradual;
  303. text-align: center;
  304. color: $font-color-white;
  305. padding: 30rpx 0;
  306. border-radius: 99rpx;
  307. margin: 20rpx 30rpx 0rpx 30rpx;
  308. }
  309. }
  310. // .item1:nth-child(odd) {
  311. // margin-right: 30rpx;
  312. // }
  313. .item1 {
  314. line-height: 1;
  315. background: url(../../static/img/rengouBg.png) no-repeat;
  316. background-position: right bottom;
  317. background-size: 140rpx 115rpx;
  318. flex-grow: 1;
  319. width: 100%;
  320. margin-bottom: 30rpx;
  321. border-radius: 15rpx;
  322. background-color: #ffffff;
  323. border: 1px solid #2E58FF;
  324. padding: 15rpx 10rpx 35rpx 30rpx;
  325. .ls1 {
  326. font-weight: bold;
  327. .name1 {
  328. color: $font-color-dark;
  329. font-size: $font-base + 2rpx;
  330. margin-top: 10rpx;
  331. }
  332. }
  333. .item-main {
  334. padding-top: 10rpx;
  335. .main-top {
  336. margin-top: 10rpx;
  337. font-size: 22rpx;
  338. font-family: PingFang SC;
  339. font-weight: 500;
  340. color: #6d7c88;
  341. .top-left {
  342. flex: 1;
  343. }
  344. .top-right {
  345. flex: 1;
  346. }
  347. }
  348. }
  349. }
  350. }
  351. .psw-wrapper {
  352. width: 548rpx;
  353. height: 344rpx;
  354. background-color: #ffffff;
  355. .psw-title {
  356. width: 100%;
  357. font-size: 35rpx;
  358. padding: 43rpx 0 49rpx;
  359. text-align: center;
  360. font-weight: 800;
  361. }
  362. .psw-ipt {
  363. display: block;
  364. background-color: #dce3ed;
  365. height: 90rpx;
  366. width: 464rpx;
  367. padding-left: 30rpx;
  368. margin: 0 auto;
  369. font-size: 80rpx;
  370. }
  371. .psw-btn text {
  372. display: inline-block;
  373. text-align: center;
  374. width: 50%;
  375. padding-top: 29rpx;
  376. font-size: 35rpx;
  377. }
  378. .psw-qd {
  379. color: #45969b;
  380. }
  381. }
  382. .join {
  383. margin-top: 44rpx;
  384. padding-left: 30rpx;
  385. display: flex;
  386. justify-content: flex-start;
  387. align-items: center;
  388. .xian {
  389. width: 6rpx;
  390. height: 30rpx;
  391. background: #0f253a;
  392. border-radius: 4rpx;
  393. }
  394. .join-font {
  395. padding-left: 16rpx;
  396. font-size: 30rpx;
  397. font-family: PingFang SC;
  398. font-weight: bold;
  399. color: #0f253a;
  400. }
  401. }
  402. </style>