teamDetails.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view class="center">
  3. <view class="box">
  4. <view class="title flex">
  5. <view class="flex">
  6. <view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
  7. <view class="name">{{ item.name }}</view>
  8. <view class="lun">{{ item.lun }}</view>
  9. </view>
  10. <view v-if="item.status == 0" class="more text-gray">未开始</view>
  11. <view v-if="item.status >0" class="more text-success" >已开奖</view>
  12. </view>
  13. <view class="main">
  14. <view class="main-info rule">每轮限购1组,每组限购1份</view>
  15. <view class="main-info time">
  16. 开奖时间:
  17. <text>{{item.time}} 22:00:00</text>
  18. </view>
  19. <view class="main-info new">该轮预约{{item.bingos+item.fails}}份,拼中{{item.bingos}}份,退回{{item.fails}}份</view>
  20. </view>
  21. </view>
  22. <view class="box">
  23. <view class="allTitle">
  24. <view class="title-left">第{{item.table_id}}组 预约份数/总份数:{{item.joins}}/{{item.join_number}}</view>
  25. <view class="title-right text-gray" v-if="item.status == 0">未开奖</view>
  26. <view class="title-right text-success" v-if="item.status == 1">已中奖</view>
  27. <view class="title-right text-danger" v-if="item.status == 2">未中奖</view>
  28. <view class="title-right text-warning" v-if="item.status == 3">未成团</view>
  29. </view>
  30. <view class="yu-main">
  31. <view class="img"><image src="../../static/img/bgTip2.png" mode="scaleToFill"></image></view>
  32. <view class="yu-info">
  33. <view class="info" v-if="item.status > 1">
  34. <view class="yu-font">回退本金</view>
  35. <view class="yu-num">{{item.cost+item.type}}</view>
  36. </view>
  37. <view class="info">
  38. <view class="yu-font">收益</view>
  39. <view class="yu-num">{{item.join_award+item.type}}</view>
  40. </view>
  41. <view class="info">
  42. <view class="yu-font">唯一凭证</view>
  43. </view>
  44. <view class="info">
  45. <view class="yu-num">{{item.order_id}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="boom">
  50. <view class="boom-font">当前组爆快</view>
  51. <!-- <view class="boom-num">
  52. LALA122002552000
  53. <br />
  54. LALA122002552000
  55. </view> -->
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import { pinkLogDate } from '@/api/finance.js';
  62. export default {
  63. data() {
  64. return {
  65. id: '',
  66. item: {}
  67. };
  68. },
  69. onLoad(e) {
  70. this.id = e.id;
  71. this.getDate();
  72. },
  73. methods: {
  74. getDate() {
  75. uni.showLoading({
  76. title: '加载中'
  77. });
  78. pinkLogDate({}, this.id)
  79. .then(e => {
  80. console.log(e)
  81. const ls = e.data;
  82. const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
  83. const time = new Date(ls.pay_time * 1000);
  84. let sy = ls.join_award*ls.cost/100+'';
  85. const num = sy.split('.')[1]
  86. console.log(sy,"1111111111")
  87. // 判断小数点是否超过8位数标
  88. // if(num&&num.length>8){
  89. // sy = (+sy).toFixed(8);
  90. // }
  91. this.item = {
  92. name: ls.activity.name,
  93. lun,
  94. fen: 1,
  95. money: +ls.cost,
  96. type: ls.cost_money_type,
  97. time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
  98. stopTime:'',
  99. image: ls.activity.background_image,
  100. id: ls.id,
  101. status: ls.status,
  102. bingos:ls.bingos,
  103. fails:ls.fails,
  104. table_id:ls.table_id,
  105. joins:ls.joins.length,
  106. join_number:ls.activity.join_number,
  107. cost:+ls.cost,
  108. join_award:+sy,
  109. order_id:ls.order_id
  110. };
  111. console.log(this.item)
  112. uni.hideLoading();
  113. })
  114. .catch(e => {
  115. console.log(e);
  116. });
  117. }
  118. }
  119. };
  120. </script>
  121. <style lang="scss">
  122. .center,
  123. page {
  124. height: 100%;
  125. background: #f7fbfe;
  126. }
  127. .box {
  128. margin: 30rpx auto 0;
  129. width: 690rpx;
  130. background: #ffffff;
  131. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  132. border-radius: 20rpx;
  133. padding: 26rpx 36rpx 30rpx 30rpx;
  134. .title {
  135. .log {
  136. width: 48rpx;
  137. height: 46rpx;
  138. image {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. .name {
  144. padding-left: 12rpx;
  145. font-size: 34rpx;
  146. font-family: PingFang SC;
  147. font-weight: bold;
  148. color: #0f253a;
  149. }
  150. .lun {
  151. padding-left: 10rpx;
  152. font-size: 26rpx;
  153. font-family: PingFang SC;
  154. font-weight: 500;
  155. color: #6d7c88;
  156. }
  157. .more {
  158. padding-left: 140rpx;
  159. font-size: 28rpx;
  160. font-family: PingFang SC;
  161. font-weight: bold;
  162. color: #44969d;
  163. }
  164. }
  165. .main {
  166. margin-top: 26rpx;
  167. .main-info {
  168. padding-top: 16rpx;
  169. }
  170. .rule {
  171. font-size: 26rpx;
  172. font-family: PingFang SC;
  173. font-weight: 500;
  174. color: #0f253a;
  175. }
  176. .time {
  177. font-size: 26rpx;
  178. font-family: PingFang SC;
  179. font-weight: 500;
  180. color: #6d7c88;
  181. text {
  182. color: #0f253a;
  183. }
  184. }
  185. .new {
  186. font-size: 24rpx;
  187. font-family: PingFang SC;
  188. font-weight: 500;
  189. color: #ff4c4c;
  190. }
  191. }
  192. }
  193. .allTitle {
  194. display: flex;
  195. justify-content: space-between;
  196. align-items: center;
  197. .title-left {
  198. font-size: 34rpx;
  199. font-family: PingFang SC;
  200. font-weight: bold;
  201. color: #0f253a;
  202. }
  203. .title-right {
  204. font-size: 26rpx;
  205. font-family: PingFang SC;
  206. font-weight: 500;
  207. color: #6d7c88;
  208. }
  209. }
  210. .yu-main {
  211. margin-top: 40rpx;
  212. display: flex;
  213. justify-content: flex-start;
  214. align-items: center;
  215. .img {
  216. width: 180rpx;
  217. height: 155rpx;
  218. flex-shrink: 0;
  219. image {
  220. width: 100%;
  221. height: 100%;
  222. }
  223. }
  224. .yu-info {
  225. padding-top: 14rpx;
  226. margin-left: 20rpx;
  227. width: 100%;
  228. .info {
  229. display: flex;
  230. justify-content: space-between;
  231. .yu-font {
  232. flex-shrink: 0;
  233. font-size: 26rpx;
  234. font-family: PingFang SC;
  235. font-weight: 500;
  236. color: #6d7c88;
  237. }
  238. .yu-num {
  239. font-size: 26rpx;
  240. font-family: PingFang SC;
  241. font-weight: bold;
  242. color: #0f253a;
  243. }
  244. }
  245. }
  246. }
  247. .boom {
  248. padding-left: 14rpx;
  249. margin-top: 28rpx;
  250. display: flex;
  251. justify-content: space-between;
  252. .boom-font {
  253. font-size: 26rpx;
  254. font-family: PingFang SC;
  255. font-weight: 500;
  256. color: #6d7c88;
  257. }
  258. .boom-num {
  259. font-size: 26rpx;
  260. font-family: PingFang SC;
  261. font-weight: bold;
  262. color: #0f253a;
  263. }
  264. }
  265. </style>