xiemingyang 3 роки тому
батько
коміт
a91d6a524c
4 змінених файлів з 319 додано та 8 видалено
  1. 13 0
      pages.json
  2. 261 0
      pages/user/balance.vue
  3. 43 6
      pages/user/extend.vue
  4. 2 2
      pages/user/user.vue

+ 13 - 0
pages.json

@@ -63,6 +63,19 @@
 				"navigationBarTitleText": "个人中心"
 			}
 		},
+		{
+			"path": "pages/user/balance",
+					"style": {
+						"navigationBarTextStyle":"black",
+						"navigationBarBackgroundColor": "transparent",
+						"app-plus": {
+							"titleNView": {
+								"type": "float",
+								"titleText": "我的钱包"
+								}
+							}
+						}
+		},
 		{
 			"path": "pages/user/accounts",
 					"style": {

+ 261 - 0
pages/user/balance.vue

@@ -0,0 +1,261 @@
+<template>
+	<view class="container">
+		<!-- 头部 -->
+		<view class="header">
+			<image src="../../static/img/img33.png" mode="scaleToFill"></image>
+			<!-- 钱 -->
+			<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;
+			}
+		}
+		
+			.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: 200rpx;
+
+			.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>
+	

+ 43 - 6
pages/user/extend.vue

@@ -7,9 +7,11 @@
 		</view>
 		<!-- 推广 -->
 		<view class="navbar">
+			<view class="one">5</view>
+			<view class="line"></view>
+			<view class="two">120</view>
 			<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"
 			>
@@ -20,6 +22,7 @@
 				<scroll-view class="scorll" scroll-y="true" >
 					<view class="cost">
 						<view class="award" v-for="item in 10">
+							<image src="../../static/tabBar/tab-my-current.png" mode="scaleToFill"></image>
 							<view class="award-left">
 								<view class="text">xxx</view>
 								<view class="time">2021-8-26 09:30</view>
@@ -118,13 +121,43 @@ export default {
 		}
 		.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;
+			width: 702rpx;
+			height: 120rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			margin-top: -70rpx;
+			margin-left: 25rpx;
+			.one {
+				position: absolute;
+				top: 10%;
+				left: 25%;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF0000;
+			}
+			.two {
+				position: absolute;
+				top: 10%;
+				left: 70%;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF0000;
+			}
+			.line {
+				width: 2rpx;
+				height: 54rpx;
+				background: #EEEEEE;
+				position: absolute;
+				top: 30%;
+				left: 50%;
+			}
 	
 			.nav-item {
 				flex: 1;
@@ -132,9 +165,10 @@ export default {
 				justify-content: center;
 				align-items: center;
 				height: 100%;
-				font-size: 15px;
+				font-size: 30rpx;
 				color: #999999;
 				position: relative;
+				padding-top: 40rpx;
 	
 				&.current {
 					color: #333333;
@@ -164,8 +198,11 @@ export default {
 				border-bottom: 1px solid #F0F4F8;
 				margin-left: 25rpx;
 				display: flex;
-				justify-content: space-between;
 				align-items: center;
+				image {
+					width: 80rpx;
+					height: 80rpx;
+				}
 	
 				.award-left {
 					width: 221rpx;

+ 2 - 2
pages/user/user.vue

@@ -38,7 +38,7 @@
 					</view>
 					<view class="order-item">
 						<image src="../../static/img/img21.png" mode="scaleToFill"></image>
-						<view class="text">待收</view>
+						<view class="text">待收</view>
 					</view>
 					<view class="order-item">
 						<image src="../../static/img/img22.png" mode="scaleToFill"></image>
@@ -51,7 +51,7 @@
 		<view class="item-box">
 			<!-- 我的余额 -->
 			<view class="order-section">
-				<view class="order-item">
+				<view class="order-item" @click="nav('/pages/user/balance')">
 					<image src="../../static/img/img26.png" mode="scaleToFill"></image>
 					<view class="text">我的余额</view>
 				</view>