123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <template>
- <view class="container">
- <!-- 头部 -->
- <view class="header">
- <image src="../../static/img/img33.png" mode="scaleToFill"></image>
- <!-- 我的佣金 -->
- <view class="yongjin">
- <image src="../../static/img/xiangzuo.png" mode="scaleToFill" @click.stop="back()"></image>
- <view class="text">我的佣金</view>
- </view>
- <!-- 佣金转账 -->
- <view class="accounts" @click="nav('/pages/user/transfer')">
- <view class="text">佣金转账</view>
- </view>
- <!-- 钱 -->
- <view class="money">
- <view class="fuhao">¥</view>
- <view class="counts">3852</view>
- </view>
- </view>
- <!-- 收入和支出 -->
- <view class="navbar">
- <view class="nav-item" v-for="(item, index) in navList" :key="index"
- :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
- </view>
- <swiper class="swiper-box" :current="tabCurrentIndex" duration="300" @change="changeTab"
- >
- <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
- <!-- 空白页 -->
- <!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
- <!-- 推广奖励 -->
- <scroll-view class="scorll" scroll-y="true" >
- <view class="cost">
- <view class="award" v-for="item in 10">
- <view class="award-left">
- <view class="text">推广奖励到账</view>
- <view class="time">2021-8-26 09:30</view>
- </view>
- <view class="award-right">+200</view>
- </view>
- </view>
- </scroll-view>
- </swiper-item>
- </swiper>
- <view class="btm">
- <view class="btn" @click="nav('/pages/user/withdraw')">立即提现</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- height: '',
- tabCurrentIndex: 0,
- navList: [{
- state: 1,
- text: '收入',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 2,
- text: '支出',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- }
- ],
- list: [],
- money: ''
- }
- },
- methods: {
- nav (url) {
- uni.navigateTo({
- url
- })
- },
- back(){
- uni.navigateBack({
- delta:1
- })
- },
- handclick () {
- console.log(123)
- },
- //swiper 切换
- changeTab(e) {
- this.tabCurrentIndex = e.target.current;
- this.loadData('tabChange')
- },
- //顶部tab点击
- tabClick(index) {
- this.tabCurrentIndex = index;
- }
- }
- }
- </script>
- <style lang="scss">
- .container {
- width: 750rpx;
- height: 1334rpx;
- background-color: #f1f1f1;
- .header {
- position: relative;
- image {
- width: 750rpx;
- height: 400rpx;
- }
- .yongjin {
- // background-color: pink;
- padding-top: 50rpx;
- width: 100%;
- position: absolute;
- z-index: 10;
- top: 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- image {
- width: 20rpx;
- height: 37rpx;
- margin-left: 30rpx;
- }
-
- .text {
- font-size: 36rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- margin-right: 300rpx;
- }
- }
- }
-
- .accounts {
- width: 147rpx;
- height: 56rpx;
- background-color: #fff;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- position: absolute;
- top: 0;
- right: 0;
- margin-top: 134rpx;
- .text {
- width: 112rpx;
- height: 27rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF0000;
- padding-top: 8rpx;
- margin-left: 18rpx;
- }
- }
- .money {
- top: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- position: absolute;
- padding-left: 246rpx;
- padding-top: 210rpx;
- .fuhao {
- font-size: 45rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #3F7C1F;
- padding-top: 25rpx;
- }
- .counts {
- font-size: 70rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #3F7C1F;
- }
- }
- .swiper-box {
- height: calc(100% - 700rpx);
- background-color: #FFFFFF;
- }
- .scorll {
- height: 100%;
- }
- .navbar {
- display: flex;
- height: 100rpx;
- padding: 0 5rpx;
- background: #fff;
- box-shadow: 0 1rpx 5rpx rgba(0, 0, 0, 0.06);
- position: relative;
- z-index: 10;
- margin-top: 25rpx;
- .nav-item {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- font-size: 15px;
- color: #999999;
- position: relative;
- &.current {
- color: #333333;
- &:after {
- content: '';
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-50%);
- width: 44px;
- height: 0;
- border-bottom: 2px solid #3F7C1F;
- }
- }
- }
- }
- .cost {
- width: 750rpx;
- height: auto;
- background-color: #fff;
- .award {
- width: 701rpx;
- height: 132rpx;
- border-bottom: 1px solid #F0F4F8;
- margin-left: 25rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .award-left {
- width: 221rpx;
- height: 40rpx;
- margin-left: 30rpx;
- margin-bottom: 35rpx;
- .text {
- width: 182rpx;
- height: 30rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #666666;
- margin-bottom: 16rpx;
- }
- .time {
- width: 221rpx;
- height: 20rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #AEAEAE;
- }
- }
- .award-right {
- width: 82rpx;
- height: 27rpx;
- font-size: 36rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF0000;
- margin-right: 30rpx;
- }
- }
- }
- .btm {
- background-color: #fff;
- height: 190rpx;
- padding-top: 40rpx;
- display: flex;
- justify-content: center;
- .btn {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 674rpx;
- height: 88rpx;
- background: linear-gradient(-35deg, #F8DD4F, #FBEB77);
- border-radius: 44rpx;
- }
- }
- }
- </style>
|