myNote.vue 9.1 KB

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