balance.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <view class="container">
  3. <!-- 头部 -->
  4. <view class="header">
  5. <image src="../../static/img/img33.png" mode="scaleToFill"></image>
  6. <!-- 钱 -->
  7. <view class="money">
  8. <view class="fuhao">¥</view>
  9. <view class="counts">3852</view>
  10. </view>
  11. </view>
  12. <!-- 收入和支出 -->
  13. <view class="navbar">
  14. <view class="nav-item" v-for="(item, index) in navList" :key="index"
  15. :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
  16. </view>
  17. <swiper class="swiper-box" :current="tabCurrentIndex" duration="300" @change="changeTab"
  18. >
  19. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
  20. <!-- 空白页 -->
  21. <!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
  22. <!-- 推广奖励 -->
  23. <scroll-view class="scorll" scroll-y="true" >
  24. <view class="cost">
  25. <view class="award" v-for="item in 10">
  26. <view class="award-left">
  27. <view class="text">充值到账</view>
  28. <view class="time">2021-8-26 09:30</view>
  29. </view>
  30. <view class="award-right">+200</view>
  31. </view>
  32. </view>
  33. </scroll-view>
  34. </swiper-item>
  35. </swiper>
  36. <view class="btm">
  37. <view class="btn" @click="nav('/pages/user/withdraw')">立即提现</view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. height: '',
  46. tabCurrentIndex: 0,
  47. navList: [{
  48. state: 1,
  49. text: '收入',
  50. loadingType: 'more',
  51. orderList: [],
  52. page: 1, //当前页数
  53. limit: 10 //每次信息条数
  54. },
  55. {
  56. state: 2,
  57. text: '支出',
  58. loadingType: 'more',
  59. orderList: [],
  60. page: 1, //当前页数
  61. limit: 10 //每次信息条数
  62. }
  63. ],
  64. list: [],
  65. money: ''
  66. }
  67. },
  68. methods: {
  69. nav (url) {
  70. uni.navigateTo({
  71. url
  72. })
  73. },
  74. // back(){
  75. // uni.navigateBack({
  76. // delta:1
  77. // })
  78. // },
  79. // handclick () {
  80. // console.log(123)
  81. // },
  82. //swiper 切换
  83. changeTab(e) {
  84. this.tabCurrentIndex = e.target.current;
  85. this.loadData('tabChange')
  86. },
  87. //顶部tab点击
  88. tabClick(index) {
  89. this.tabCurrentIndex = index;
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss">
  95. .container {
  96. width: 750rpx;
  97. height: 1334rpx;
  98. background-color: #f1f1f1;
  99. .header {
  100. position: relative;
  101. image {
  102. width: 750rpx;
  103. height: 400rpx;
  104. }
  105. }
  106. .text {
  107. width: 112rpx;
  108. height: 27rpx;
  109. font-size: 28rpx;
  110. font-family: PingFang SC;
  111. font-weight: bold;
  112. color: #FF0000;
  113. padding-top: 8rpx;
  114. margin-left: 18rpx;
  115. }
  116. .money {
  117. top: 0;
  118. display: flex;
  119. justify-content: center;
  120. align-items: center;
  121. position: absolute;
  122. padding-left: 246rpx;
  123. padding-top: 200rpx;
  124. .fuhao {
  125. font-size: 45rpx;
  126. font-family: PingFang SC;
  127. font-weight: bold;
  128. color: #3F7C1F;
  129. padding-top: 25rpx;
  130. }
  131. .counts {
  132. font-size: 70rpx;
  133. font-family: PingFang SC;
  134. font-weight: bold;
  135. color: #3F7C1F;
  136. }
  137. }
  138. .swiper-box {
  139. height: calc(100% - 700rpx);
  140. background-color: #FFFFFF;
  141. }
  142. .scorll {
  143. height: 100%;
  144. }
  145. .navbar {
  146. display: flex;
  147. height: 100rpx;
  148. padding: 0 5rpx;
  149. background: #fff;
  150. box-shadow: 0 1rpx 5rpx rgba(0, 0, 0, 0.06);
  151. position: relative;
  152. z-index: 10;
  153. margin-top: 25rpx;
  154. .nav-item {
  155. flex: 1;
  156. display: flex;
  157. justify-content: center;
  158. align-items: center;
  159. height: 100%;
  160. font-size: 15px;
  161. color: #999999;
  162. position: relative;
  163. &.current {
  164. color: #333333;
  165. &:after {
  166. content: '';
  167. position: absolute;
  168. left: 50%;
  169. bottom: 0;
  170. transform: translateX(-50%);
  171. width: 44px;
  172. height: 0;
  173. border-bottom: 2px solid #3F7C1F;
  174. }
  175. }
  176. }
  177. }
  178. .cost {
  179. width: 750rpx;
  180. height: auto;
  181. background-color: #fff;
  182. .award {
  183. width: 701rpx;
  184. height: 132rpx;
  185. border-bottom: 1px solid #F0F4F8;
  186. margin-left: 25rpx;
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. .award-left {
  191. width: 221rpx;
  192. height: 40rpx;
  193. margin-left: 30rpx;
  194. margin-bottom: 35rpx;
  195. .text {
  196. width: 182rpx;
  197. height: 30rpx;
  198. font-size: 30rpx;
  199. font-family: PingFang SC;
  200. font-weight: bold;
  201. color: #666666;
  202. margin-bottom: 16rpx;
  203. }
  204. .time {
  205. width: 221rpx;
  206. height: 20rpx;
  207. font-size: 26rpx;
  208. font-family: PingFang SC;
  209. font-weight: 500;
  210. color: #AEAEAE;
  211. }
  212. }
  213. .award-right {
  214. width: 82rpx;
  215. height: 27rpx;
  216. font-size: 36rpx;
  217. font-family: PingFang SC;
  218. font-weight: bold;
  219. color: #FF0000;
  220. margin-right: 30rpx;
  221. }
  222. }
  223. }
  224. .btm {
  225. background-color: #fff;
  226. height: 190rpx;
  227. padding-top: 40rpx;
  228. display: flex;
  229. justify-content: center;
  230. .btn {
  231. display: flex;
  232. justify-content: center;
  233. align-items: center;
  234. width: 674rpx;
  235. height: 88rpx;
  236. background: linear-gradient(-35deg, #F8DD4F, #FBEB77);
  237. border-radius: 44rpx;
  238. }
  239. }
  240. }
  241. </style>