accounts.vue 5.6 KB

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