pledge.vue 5.1 KB

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