pledge.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <view class="all">
  3. <view class="top">
  4. <text>{{$t('homepledge.m0')}}</text>
  5. </view>
  6. <image class="img" src="../../static/img/zhiya2.png" mode="scaleToFill" style=""></image>
  7. <view @click="navigator" class="my flex">
  8. <view class="flex">
  9. <image class="titleTip margin-r-10" src="../../static/img/zhiya3.png" mode=""></image>
  10. <view>
  11. {{$t('homepledge.m1')}}
  12. </view>
  13. </view>
  14. <image class="right" src="../../static/img/zhiya1.png" style="" mode=""></image>
  15. </view>
  16. <view class="buttom flex" v-for="(item,ind) in navList">
  17. <view class="le" @click="nav">
  18. <view class="le1 title ">
  19. {{ind}}
  20. </view>
  21. <view class="le1 ">
  22. 20U{{$t('homepledge.m2')}} | 1{{$t('homepledge.m3')}}
  23. </view>
  24. <view class="le1 ">
  25. {{$t('homepledge.total')}}:1234534.3456U
  26. </view>
  27. <view class="le2 flex font-color-gray">
  28. <view class="line margin-r-10">
  29. <view class="line-action" :style="{'margin-left': (-100+42.94)+'%'}">
  30. </view>
  31. </view>
  32. <view>42.94%</view>
  33. </view>
  34. </view>
  35. <view class="ri">
  36. <view class="r1 margin-b-20"> 1.00% </view>
  37. <view class="r2 margin-b-30 font-color-gray"> {{$t('homepledge.a4')}} </view>
  38. <view class="add-buttom">
  39. {{$t('homepledge.a5')}}
  40. </view>
  41. </view>
  42. </view>
  43. <taber tab='pledge'></taber>
  44. </view>
  45. </template>
  46. <script>
  47. import taber from "@/components/footer/footer.vue";
  48. import {lock} from "@/api/mypledge.js"
  49. export default {
  50. components: {
  51. taber
  52. },
  53. data() {
  54. return {
  55. navList: {}
  56. }
  57. },
  58. onLoad() {
  59. this.loadData()
  60. },
  61. methods: {
  62. navigator() {
  63. uni.navigateTo({
  64. url: '/pages/myPledge/myPledge'
  65. })
  66. },
  67. nav() {
  68. uni.navigateTo({
  69. url: '/pages/myPledge/zyXingqing'
  70. })
  71. },
  72. loadData(source) {
  73. //这里是将订单挂载到tab列表下
  74. const that = this;
  75. lock({})
  76. .then(({
  77. data
  78. }) => {
  79. console.log('1111',data );
  80. that.navList = data.prices
  81. })
  82. .catch(e => {
  83. console.log(e);
  84. });
  85. },
  86. }
  87. };
  88. </script>
  89. <style lang="scss">
  90. .all {
  91. width: 750rpx;
  92. height: 100%;
  93. background-color: #000000;
  94. padding-top: var(--status-bar-height);
  95. }
  96. .top {
  97. padding-top: 40rpx;
  98. font-size: 36rpx;
  99. font-weight: bold;
  100. color: #ffffff;
  101. text-align: center;
  102. }
  103. .img {
  104. width: 690rpx;
  105. height: 250rpx;
  106. margin: 20rpx 30rpx;
  107. }
  108. .my {
  109. background-color: #191a1f;
  110. margin: 0 30rpx;
  111. display: flex;
  112. color: #FFF;
  113. padding: 20rpx 30rpx;
  114. border-radius: 18rpx;
  115. .titleTip {
  116. width: 40rpx;
  117. height: 40rpx;
  118. }
  119. .right {
  120. width: 16rpx;
  121. height: 26rpx;
  122. }
  123. }
  124. .buttom {
  125. background-color: #191a1f;
  126. border-radius: 18rpx;
  127. margin: 30rpx;
  128. padding: 30rpx;
  129. line-height: 1;
  130. .le {
  131. font-size: 20rpx;
  132. .le1 {
  133. font-weight: 800;
  134. color: #feb041;
  135. margin-bottom: 20rpx;
  136. &.title {
  137. font-size: 33rpx;
  138. color: #ffffff;
  139. }
  140. }
  141. .le2 {
  142. .line {
  143. width: 308rpx;
  144. height: 16rpx;
  145. background-color: rgba(235, 235, 235, 0.38);
  146. border-radius: 99rpx;
  147. overflow: hidden;
  148. .line-action{
  149. height: 100%;
  150. width: 100%;
  151. border-radius: 99rpx;
  152. background-color:#FEB041 ;
  153. }
  154. }
  155. }
  156. }
  157. .r1 {
  158. font-size: 47rpx;
  159. font-weight: 800;
  160. color: #FF0102;
  161. }
  162. .r2 {
  163. font-size: 21rpx;
  164. font-weight: 500;
  165. color: #999999;
  166. }
  167. .add-buttom {
  168. background: #feb041;
  169. border-radius: 6rpx;
  170. font-size: 21rpx;
  171. font-weight: 800;
  172. color: #191a1f;
  173. padding:10rpx 20rpx ;
  174. text-align: center;
  175. }
  176. }
  177. </style>