瀏覽代碼

2021-8-26

xiemingyang 3 年之前
父節點
當前提交
e40cd23a96
共有 4 個文件被更改,包括 312 次插入2 次删除
  1. 8 0
      pages.json
  2. 296 0
      pages/user/accounts.vue
  3. 8 2
      pages/user/user.vue
  4. 二進制
      static/img/img33.png

+ 8 - 0
pages.json

@@ -61,6 +61,14 @@
 			"style": {
 				"navigationBarTitleText": "个人中心"
 			}
+		},
+		{
+			"path": "pages/user/accounts",
+			"style": {
+				"navigationBarTitleText": "我的佣金",
+				"navigationBarBackgroundColor":"#F1F1F1",
+				"navigationStyle": "custom"
+			}
 		},
 		{
 			"path": "pages/story/story",

+ 296 - 0
pages/user/accounts.vue

@@ -0,0 +1,296 @@
+<template>
+	<view class="container">
+		<!-- 头部 -->
+		<view class="header">
+			<image src="../../static/img/img33.png" mode="scaleToFill"></image>
+			<!-- 我的佣金 -->
+			<view class="yongjin">
+				<image src="../../static/img/xiangxia.png" mode="scaleToFill"></image>
+				<view class="text">我的佣金</view>
+			</view>
+			<!-- 佣金转账 -->
+			<view class="accounts">
+				<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="handclick">立即提现</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: {
+			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;
+				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>

+ 8 - 2
pages/user/user.vue

@@ -55,7 +55,7 @@
 					<image src="../../static/img/img26.png" mode="scaleToFill"></image>
 					<view class="text">我的余额</view>
 				</view>
-				<view class="order-item">
+				<view class="order-item" @click="nav('/pages/user/accounts')">
 					<image src="../../static/img/img23.png" mode="scaleToFill"></image>
 					<view class="text">我的佣金</view>
 				</view>
@@ -105,7 +105,13 @@ export default {
 	data () {
 		return {}
 	},
-	methods: {}
+	methods: {
+		nav (url) {
+			uni.navigateTo({
+				url
+			})
+		}
+	}
 }
 </script>
 

二進制
static/img/img33.png