order.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <v-page class="pledgeRonqi">
  3. <v-header class="" :border="false" :title="$t('pledge.record')" :leftClick="()=>_router.replace('/pages/pledge/index')">
  4. <!-- <template #right>
  5. <v-link :to="{path:'/pages/pledge/index'}">
  6. <van-icon class="fn-20 pld-mt" name="orders-o" />
  7. </v-link>
  8. </template> -->
  9. </v-header>
  10. <view class="ordermain" v-for="(item, idx) in pledge"
  11. :key="idx">
  12. <view class="ordernum">
  13. {{$t(`pledge.ordernum`)}}:{{item.order_no}}
  14. </view>
  15. <view class='orderInfo font-new'>
  16. <view class="orderImg">
  17. <!-- <img style="width:100%;height:100%;" src="/static/img/drak_doing.png" alt=""> -->
  18. <view :class="item.status == 1 ? 'cycleDiv_out cycleDivDoing' : 'cycleDiv_out' ">
  19. <view class="cycleDiv_in">
  20. <text style="line-height:150upx;font-size:18upx;color:#00A67F;" v-if="item.status=='1'">{{$t(`pledge.income`)}}</text>
  21. <text style="line-height:150upx;font-size:18upx;color:#00A67F;" v-else>{{$t(`pledge.completed`)}}</text>
  22. </view>
  23. <view class="cycle_mengban"></view>
  24. </view>
  25. </view>
  26. <view class='orderInfoRight'>
  27. <view class="orderTitle">{{item.product_name}}</view>
  28. <view class="orderContent orderMagin">
  29. <text>{{$t(`pledge.biz`)}}: </text>
  30. <text class="m-l-xs">{{item.coin_name}}</text>
  31. </view>
  32. <view class="orderContent orderMagin">
  33. <text>{{$t(`pledge.cycle`)}}:</text>
  34. <text class="m-l-xs">{{item.cycle}} {{$t(`exchange.f0`)}}</text>
  35. </view>
  36. <view class="orderContent orderMagin">
  37. <text>{{$t(`pledge.zynum`)}}:</text>
  38. <text class="m-l-xs">{{item.pay_num}}</text>
  39. </view>
  40. <view class="orderContent orderMagin" v-if="item.status=='1'">
  41. <text>{{$t(`pledge.profit`)}} ≈ </text>
  42. <text class="m-l-xs"> {{getResult(item)}} ETH</text>
  43. </view>
  44. <view class="orderContent orderMagin" v-else>
  45. <text>{{$t(`pledge.f1`)}}:</text>
  46. <text class="m-l-xs">{{getResult(item)}} ETH</text>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- <view class="orderTimeArea">
  51. <view class="orderTime">{{$t(`pledge.create_time`)}} : {{item.created_at}}</view>
  52. <view class="orderTime orderTimeR">{{$t(`pledge.end_time`)}} : {{item.end_time}}</view>
  53. </view> -->
  54. <view class="orderTimeArea">
  55. {{$t(`pledge.create_time`)}} : {{$date(item.created_at)}}
  56. </view>
  57. <view class="orderTimeArea">
  58. {{$t(`pledge.end_time`)}} : {{$date(item.end_time)}}
  59. </view>
  60. </view>
  61. </v-page>
  62. </template>
  63. <script>
  64. import Order from "@/api/pledge";
  65. import app from "@/app";
  66. export default {
  67. name: "order",
  68. data() {
  69. return {
  70. pledge:{},
  71. app,
  72. taskHeight:0,
  73. form:{
  74. limit:"",
  75. page:""
  76. }
  77. };
  78. },
  79. methods:{
  80. indexData() {
  81. let data = this.form;
  82. data.limit = 100;
  83. data.page = 1;
  84. let ajax = Order.getOrderList(data, { loading: true });
  85. ajax
  86. .then((res) => {
  87. console.log(res)
  88. if(res.code == 200){
  89. this.pledge = res.data;
  90. }
  91. })
  92. .catch(() => {});
  93. },
  94. getResult(item){
  95. if(!item)return
  96. const {pay_num,eth_price,rate,cycle} = item
  97. let result = (((pay_num*cycle*rate)/eth_price)*0.01).toFixed(6)
  98. return result
  99. },
  100. jumpBack(){
  101. // this.$router.push({path:'/pages/pledge/index'});
  102. uni.navigateTo({
  103. url:'/pages/pledge/index',
  104. fail() {
  105. uni.switchTab({
  106. url:'/pages/pledge/index'
  107. })
  108. }
  109. })
  110. }
  111. },
  112. onLoad() {
  113. this.indexData();
  114. },
  115. destroyed() {},
  116. };
  117. </script>
  118. <style lang="scss" scoped>
  119. // .orderlistRonqi{margin-bottom:15upx;}
  120. .ordernum{font-size:24upx;color:#999999;margin-bottom:29upx;}
  121. .orderImg{width:210upx;height:210upx;}
  122. .orderInfo{display:flex;padding-bottom:27upx;}
  123. .orderInfoRight{margin-left:15upx;width:500upx;}
  124. .orderContent{}
  125. .orderCLeft{display:inline-block;font-size:28upx;}
  126. .orderCRight{display:inline-block;margin-left:28upx;}
  127. .orderMagin{margin-bottom:7upx;}
  128. .orderTime{font-size:20upx;color:#999;display:inline-block;}
  129. .orderTimeR{position: absolute;right:0;}
  130. .orderTimeArea{display:flex;position:relative;}
  131. // .cycle_mengban{
  132. // width:100upx;
  133. // height:100upx;
  134. // border-radius:0 100% 0 0;
  135. // position:absolute;
  136. // top:0;
  137. // right:0;
  138. // background:#F6F6F6;
  139. // }
  140. .cycleDiv_out{
  141. width:100%;
  142. height:100%;
  143. border-radius:50%;
  144. position:relative;
  145. // background:#00A67F;
  146. background:var(--menban);
  147. text-align:center;
  148. z-index:5;
  149. }
  150. .cycleDivDoing{
  151. background:#00A67F !important;
  152. }
  153. // .cycleDiv_in{
  154. // width:160upx;
  155. // height:160upx;
  156. // border-radius:50%;
  157. // top:25upx;
  158. // margin:auto;
  159. // position:relative;
  160. // background:#FFFFFF;
  161. // z-index:10;
  162. // }
  163. .fgreen{color:#00A67F}
  164. .join{background: #FFC119;color:#333333;width:145upx;height:60upx;position:absolute;right:0upx;bottom:0upx;font-size:26upx;font-weight:bold;padding:0;}
  165. </style>