myPing.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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">{{happy || '0.00' }}</view>
  7. <view class="info-font">福气值</view>
  8. </view> -->
  9. <view class="info" v-for="ls in listType">
  10. <view class="info-num">{{ ls.num || '0.00' }}</view>
  11. <view class="info-font">奖金池</view>
  12. </view>
  13. <!-- <view class="info">
  14. <view class="info-num">{{honor || '0.00' }}</view>
  15. <view class="info-font">荣誉值</view>
  16. </view> -->
  17. </view>
  18. <!-- <view class="money flex">
  19. <view class="money-box">
  20. <view class="money-num">{{usdt || '0.00' }}</view>
  21. <view class="money-font">昨日USDT分红池</view>
  22. </view>
  23. <view class="money-box" >
  24. <view class="money-num" style="text-align: right;">{{fil || '0.00' }}</view>
  25. <view class="money-font">昨日FIL分红池</view>
  26. </view>
  27. </view> -->
  28. <view class="join">
  29. <view class="xian"></view>
  30. <view class="join-font">参与记录</view>
  31. </view>
  32. <view v-for="(item, index) in list" :key="index" class="box" @click="nav(item)">
  33. <view class="title flex">
  34. <view class="flex clamp">
  35. <view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
  36. <view class="name clamp">{{ item.name }}</view>
  37. <view class="lun">
  38. <text>{{ item.lun }}{{ item.table }}</text>
  39. <text v-if="item.status == 0">待开团</text>
  40. <text v-if="item.status == 1">已拼中</text>
  41. <text v-if="item.status == 2">未拼中</text>
  42. <text v-if="item.status == 3">已失败</text>
  43. </view>
  44. </view>
  45. <view class="more" v-if="item.status != 0">详情</view>
  46. </view>
  47. <view class="main">
  48. <view class="main-info">
  49. <view class="main-left">参与份数</view>
  50. <view class="main-right">{{ item.fen }}人份</view>
  51. </view>
  52. <view class="main-info">
  53. <view class="main-left">参与金额</view>
  54. <view class="main-right">{{ item.money + item.type }}</view>
  55. </view>
  56. <view class="main-info">
  57. <view class="main-left">参与时间</view>
  58. <view class="main-right">{{ item.time }}</view>
  59. </view>
  60. </view>
  61. </view>
  62. <u-loadmore style="margin-top: 10rpx;" :icon="true" icon-type="flower" :status="loadtype" />
  63. </view>
  64. </template>
  65. <script>
  66. import { pinkLog, systemWallet } from '@/api/finance.js';
  67. export default {
  68. data() {
  69. return {
  70. happy: '0.00',
  71. luck: '0.00',
  72. // honor: '0.00',
  73. // usdt: '0.00',
  74. // fil: '0.00',
  75. list: [],
  76. listType: [], //分红数量
  77. loadtype: 'loadmore',
  78. page: 1,
  79. limit: 10,
  80. bonus: 0 //分红
  81. };
  82. },
  83. onReachBottom() {
  84. this.loadData();
  85. },
  86. onLoad() {
  87. this.loadData();
  88. this.systemWallet();
  89. },
  90. methods: {
  91. // 获取昨日分红
  92. systemWallet() {
  93. systemWallet()
  94. .then(e => {
  95. for (let a in e.data.back) {
  96. const num = +e.data.back[a].money.money;
  97. if (num > 0) {
  98. this.listType.push({
  99. name: e.data.back[a].money.money_type,
  100. num: num
  101. });
  102. }
  103. }
  104. console.log(this.listType);
  105. })
  106. .catch(e => {
  107. console.log(e);
  108. });
  109. },
  110. loadData() {
  111. let that = this;
  112. if (that.loadtype == 'nomore') {
  113. return;
  114. }
  115. that.loadtype = 'loading';
  116. pinkLog({
  117. page: that.page,
  118. limit: that.limit
  119. })
  120. .then(e => {
  121. const data = e.data.list.map(ls => {
  122. const lun = ls.group_num > 0 ? '第'+ ls.group_num + '轮' : '';
  123. console.log(ls.table)
  124. const table = ls.table_id > 0 ? '第'+ ls.table_id + '桌' : '';
  125. const time = new Date(ls.pay_time * 1000);
  126. return {
  127. name: ls.activity.name,
  128. lun,
  129. table,
  130. fen: 1,
  131. money: +ls.cost,
  132. type: ls.cost_money_type,
  133. time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
  134. image: ls.activity.background_image,
  135. id: ls.id,
  136. status: ls.status
  137. };
  138. });
  139. that.list.push(...data);
  140. console.log(that.list,"xiangqing")
  141. // 判断是否还有数据
  142. if (that.list.length >= that.limit) {
  143. that.page++;
  144. that.loadtype = 'loadmore';
  145. } else {
  146. that.loadtype = 'nomore';
  147. }
  148. })
  149. .catch(e => {
  150. console.log(e);
  151. });
  152. },
  153. nav(e) {
  154. if(e.status == 0){
  155. }else {
  156. uni.navigateTo({
  157. url: '/pages/assets/teamDetails?id=' + e.id
  158. });
  159. }
  160. }
  161. }
  162. };
  163. </script>
  164. <style lang="scss">
  165. .center,
  166. page {
  167. height: 100%;
  168. background: #f7fbfe;
  169. }
  170. .bg {
  171. width: 750rpx;
  172. height: 248rpx;
  173. background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
  174. border-bottom-left-radius: 150rpx;
  175. border-bottom-right-radius: 150rpx;
  176. }
  177. .zong {
  178. width: 690rpx;
  179. height: 181rpx;
  180. background: #ffffff;
  181. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  182. border-radius: 20rpx;
  183. margin: -150rpx auto 0;
  184. justify-content: center;
  185. padding: 0rpx 36rpx;
  186. .info {
  187. display: flex;
  188. flex-direction: column;
  189. align-items: center;
  190. .info-num {
  191. font-size: 50rpx;
  192. font-family: PingFang SC;
  193. font-weight: bold;
  194. color: #0f253a;
  195. }
  196. .info-font {
  197. font-size: 28rpx;
  198. font-family: PingFang SC;
  199. font-weight: bold;
  200. color: #6d7c88;
  201. }
  202. }
  203. }
  204. .money {
  205. width: 690rpx;
  206. height: 143rpx;
  207. background: #ffffff;
  208. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  209. border-radius: 20rpx;
  210. margin: 10rpx auto 0;
  211. justify-content: space-between;
  212. padding: 0rpx 36rpx;
  213. .money-box {
  214. display: flex;
  215. flex-direction: column;
  216. .money-num {
  217. font-size: 40rpx;
  218. font-family: PingFang SC;
  219. font-weight: bold;
  220. color: #0f253a;
  221. }
  222. .money-font {
  223. font-size: 24rpx;
  224. font-family: PingFang SC;
  225. font-weight: bold;
  226. color: #6d7c88;
  227. }
  228. }
  229. }
  230. .join {
  231. margin-top: 44rpx;
  232. padding-left: 30rpx;
  233. display: flex;
  234. justify-content: flex-start;
  235. align-items: center;
  236. .xian {
  237. width: 6rpx;
  238. height: 30rpx;
  239. background: #0f253a;
  240. border-radius: 4rpx;
  241. }
  242. .join-font {
  243. padding-left: 16rpx;
  244. font-size: 30rpx;
  245. font-family: PingFang SC;
  246. font-weight: bold;
  247. color: #0f253a;
  248. }
  249. }
  250. .box:first-child {
  251. margin-top: 34rpx;
  252. }
  253. .box {
  254. margin: 20rpx auto 0;
  255. width: 690rpx;
  256. background: #ffffff;
  257. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  258. border-radius: 20rpx;
  259. padding: 26rpx 36rpx 30rpx 30rpx;
  260. position: relative;
  261. .title {
  262. .log {
  263. width: 48rpx;
  264. height: 46rpx;
  265. image {
  266. width: 100%;
  267. height: 100%;
  268. }
  269. }
  270. .name {
  271. padding-left: 12rpx;
  272. font-size: 34rpx;
  273. font-family: PingFang SC;
  274. font-weight: bold;
  275. color: #0f253a;
  276. max-width: 100%;
  277. }
  278. .lun {
  279. padding-left: 10rpx;
  280. font-size: 26rpx;
  281. font-family: PingFang SC;
  282. font-weight: 500;
  283. color: #6d7c88;
  284. }
  285. .more {
  286. padding-left: 10rpx;
  287. font-size: 28rpx;
  288. font-family: PingFang SC;
  289. font-weight: bold;
  290. color: #44969d;
  291. flex-shrink: 0;
  292. }
  293. }
  294. .main {
  295. margin-top: 26rpx;
  296. .main-info {
  297. padding-top: 16rpx;
  298. display: flex;
  299. justify-content: space-between;
  300. .main-left {
  301. font-size: 26rpx;
  302. font-family: PingFang SC;
  303. font-weight: 500;
  304. color: #6d7c88;
  305. }
  306. .main-right {
  307. font-size: 26rpx;
  308. font-family: PingFang SC;
  309. font-weight: bold;
  310. color: #0f253a;
  311. }
  312. }
  313. }
  314. }
  315. </style>