accounts.vue 6.3 KB

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