pledge.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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 in navList.orderList">
  17. <view class="le" @click="nav">
  18. <view class="le1 title ">
  19. 質押投資一
  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. export default {
  49. components: {
  50. taber
  51. },
  52. data() {
  53. return {
  54. navList: {
  55. loadingType: 'more',
  56. orderList: [{
  57. type: 'TRX',
  58. img: '../../static/shouye/shouye5.png',
  59. money: 2222,
  60. fl: 1,
  61. bfb: 0.25,
  62. }, {
  63. type: 'TRX',
  64. img: '../../static/shouye/shouye6.png',
  65. money: 2222,
  66. fl: 0,
  67. bfb: 9.25,
  68. }, {
  69. type: 'TRX',
  70. img: '../../static/shouye/shouye7.png',
  71. money: 2222,
  72. fl: 1,
  73. bfb: 0.25,
  74. }, {
  75. type: 'TRX',
  76. img: '../../static/shouye/shouye8.png',
  77. money: 2222,
  78. fl: 1,
  79. bfb: 0.25,
  80. }, {
  81. type: 'TRX',
  82. img: '../../static/shouye/shouye9.png',
  83. money: 2222,
  84. fl: 0,
  85. bfb: 0.25,
  86. }],
  87. page: 1, //当前页数
  88. limit: 10 //每次信息条数
  89. },
  90. };
  91. },
  92. methods: {
  93. navigator() {
  94. uni.navigateTo({
  95. url: '/pages/myPledge/myPledge'
  96. })
  97. },
  98. nav() {
  99. uni.navigateTo({
  100. url: '/pages/myPledge/zyXingqing'
  101. })
  102. },
  103. loadData(source) {
  104. //这里是将订单挂载到tab列表下
  105. let navItem = this.navList;
  106. if (source === 'tabChange' && navItem.loaded === true) {
  107. //tab切换只有第一次需要加载数据
  108. return;
  109. }
  110. if (navItem.loadingType === 'loading') {
  111. //防止重复加载
  112. return;
  113. }
  114. // 修改当前对象状态为加载中
  115. navItem.loadingType = 'loading';
  116. getCertList({
  117. page: navItem.page,
  118. limit: navItem.limit
  119. })
  120. .then(({
  121. data
  122. }) => {
  123. let list = data.list.data;
  124. navItem.orderList = navItem.orderList.concat(list);
  125. navItem.page++;
  126. if (navItem.limit == list.length) {
  127. //判断是否还有数据, 有改为 more, 没有改为noMore
  128. navItem.loadingType = 'more';
  129. return;
  130. } else {
  131. //判断是否还有数据, 有改为 more, 没有改为noMore
  132. navItem.loadingType = 'noMore';
  133. if (navItem.orderList.length == 0) {
  134. uni.showModal({
  135. title: '提示',
  136. content: '您未申请证书是否立即申请',
  137. success: res => {
  138. if (res.confirm) {
  139. uni.navigateTo({
  140. url: '/pages/certificate/apply'
  141. })
  142. }
  143. },
  144. fail: () => {},
  145. complete: () => {}
  146. });
  147. }
  148. }
  149. uni.hideLoading();
  150. this.$set(navItem, 'loaded', true);
  151. })
  152. .catch(e => {
  153. console.log(e);
  154. });
  155. },
  156. }
  157. };
  158. </script>
  159. <style lang="scss">
  160. .all {
  161. width: 750rpx;
  162. height: 100%;
  163. background-color: #000000;
  164. padding-top: var(--status-bar-height);
  165. }
  166. .top {
  167. padding-top: 40rpx;
  168. font-size: 36rpx;
  169. font-weight: bold;
  170. color: #ffffff;
  171. text-align: center;
  172. }
  173. .img {
  174. width: 690rpx;
  175. height: 250rpx;
  176. margin: 20rpx 30rpx;
  177. }
  178. .my {
  179. background-color: #191a1f;
  180. margin: 0 30rpx;
  181. display: flex;
  182. color: #FFF;
  183. padding: 20rpx 30rpx;
  184. border-radius: 18rpx;
  185. .titleTip {
  186. width: 40rpx;
  187. height: 40rpx;
  188. }
  189. .right {
  190. width: 16rpx;
  191. height: 26rpx;
  192. }
  193. }
  194. .buttom {
  195. background-color: #191a1f;
  196. border-radius: 18rpx;
  197. margin: 30rpx;
  198. padding: 30rpx;
  199. line-height: 1;
  200. .le {
  201. font-size: 20rpx;
  202. .le1 {
  203. font-weight: 800;
  204. color: #feb041;
  205. margin-bottom: 20rpx;
  206. &.title {
  207. font-size: 33rpx;
  208. color: #ffffff;
  209. }
  210. }
  211. .le2 {
  212. .line {
  213. width: 308rpx;
  214. height: 16rpx;
  215. background-color: rgba(235, 235, 235, 0.38);
  216. border-radius: 99rpx;
  217. overflow: hidden;
  218. .line-action{
  219. height: 100%;
  220. width: 100%;
  221. border-radius: 99rpx;
  222. background-color:#FEB041 ;
  223. }
  224. }
  225. }
  226. }
  227. .r1 {
  228. font-size: 47rpx;
  229. font-weight: 800;
  230. color: #FF0102;
  231. }
  232. .r2 {
  233. font-size: 21rpx;
  234. font-weight: 500;
  235. color: #999999;
  236. }
  237. .add-buttom {
  238. background: #feb041;
  239. border-radius: 6rpx;
  240. font-size: 21rpx;
  241. font-weight: 800;
  242. color: #191a1f;
  243. padding:10rpx 20rpx ;
  244. text-align: center;
  245. }
  246. }
  247. </style>