accounts.vue 5.6 KB

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