Browse Source

update:个人中心页面调整

OnePsycho 3 years ago
parent
commit
4a883a1557
3 changed files with 111 additions and 98 deletions
  1. 5 0
      package.json
  2. 9 8
      pages.json
  3. 97 90
      pages/my/my.vue

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "@escook/request-miniprogram": "^0.2.1"
+  }
+}

+ 9 - 8
pages.json

@@ -1,5 +1,13 @@
 {
-	"pages": [{
+	"pages": [
+		{
+			"path": "pages/my/my",
+			"style": {
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom",
+				"disableScroll": true
+			}
+		},{
 			"path": "pages/init/init",
 			"style": {
 				"navigationBarTitleText": "",
@@ -29,13 +37,6 @@
 				"navigationStyle": "custom"
 			}
 
-		}, {
-			"path": "pages/my/my",
-			"style": {
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom",
-				"disableScroll": true
-			}
 		}
 	],
 	//分包配置

+ 97 - 90
pages/my/my.vue

@@ -7,17 +7,34 @@
 			<image class="parent-avatar" :src="parentinfo.avatarUrl" @click="getUserInfo"></image>
 			<view class="parent-name">
 				<text class="name" @click="getUserInfo">{{parentinfo.nickName}}</text>
-				<text class="detail" @click="getUserInfo">{{childreninfo.name + '家长'}}</text>
+				<u-tag :text="childreninfo.name + '家长'" shape="circle" plain plainFill></u-tag>
 			</view>
 		</view>
 		
 		
 		<!-- 功能组件 -->
 		<view class="userinfo-container">
-				
 				<!-- 面板区域 -->
 				<view class="box-cart" >
-					<view class="cart-big" @click="updateChildrenInfo">
+					<view class="box-cart-item left-box">
+						<view class="t-icon t-icon-a-boshimaojiaoyu" ></view>
+						<view class="card-text">
+							孩子管理
+							<view class="card-des">
+								更改孩子信息
+							</view>
+						</view>
+					</view>
+					<view class="box-cart-item right-box">
+						<view class="t-icon t-icon-a-jiangpaijiangzhang" ></view>
+						<view class="card-text">
+							孩子名片
+							<view class="card-des">
+								晒出TA的优秀表现
+							</view>
+						</view>
+					</view>
+					<!-- <view class="cart-big" @click="updateChildrenInfo">
 						<image class="cart-icon" src="/static/my-icons/boy-my.png" mode="aspectFill"></image>
 						<text class="cart-text">孩子信息</text>
 					</view>
@@ -33,7 +50,7 @@
 							<text class="cart-text-sim">孩子管理</text>
 						</view>
 						
-					</view>
+					</view> -->
 				</view>
 				
 				<!-- 用户功能 -->
@@ -41,19 +58,24 @@
 					<view class="com-box">
 						<view class="cell">
 							<view class="cell-left">
-								<view class="t-icon t-icon-order_dingdan" ></view>
+								<view class="t-icon t-icon-zhanghu" ></view>
 								<view class="cell-text">个人信息</view>
 							</view>
+							<u-icon name="arrow-right" color="#bababa" size="16"></u-icon>
 						</view>
 						<view class="cell">
 							<view class="cell-left">
-								<view class="t-icon t-icon-comment_wodepinglun" ></view>
+								<view class="t-icon t-icon-a-liaotianpingluntaolunduihua" ></view>
 								<view class="cell-text">我的消息</view>
 							</view>
+							<view class="cell-right">
+								<u-badge type="error" :value="10"></u-badge>
+								<u-icon name="arrow-right" color="#bababa" size="16"></u-icon>
+							</view>
 						</view>
 						<view class="cell" @click="logout">
 							<view class="cell-left">
-								<view class="t-icon t-icon-Setting_shezhi"></view>
+								<view class="t-icon t-icon-a-tuichulikai"></view>
 								<view class="cell-text">退出登录</view>
 							</view>
 						</view>
@@ -65,19 +87,19 @@
 					<view class="com-box">
 						<view class="cell">
 							<view class="cell-left">
-								<view class="t-icon t-icon-integration_jifen"></view>
+								<view class="t-icon t-icon-shoucang"></view>
 								<view class="cell-text">客服中心</view>
 							</view>
 						</view>
 						<view class="cell">
 							<view class="cell-left">
-								<view class="t-icon t-icon-question_wodewenda"></view>
+								<view class="t-icon t-icon-a-appyingyongchengxukaifa"></view>
 								<view class="cell-text">帮助中心</view>
 							</view>
 						</view>
 						<view class="cell">
 							<view class="cell-left">
-								<view class="t-icon t-icon-contract_hetong"></view>
+								<view class="t-icon t-icon-shuji"></view>
 								<view class="cell-text">用户协议</view>
 							</view>
 						</view>
@@ -197,7 +219,7 @@
 		}
 
 		.userinfo-topinfo {
-			height: 400rpx;
+			height: 300rpx;
 			// background: linear-gradient(#ff5959, #f1f3f5);
 			display: flex;
 			justify-content: flex-start;
@@ -221,14 +243,25 @@
 				font-weight: bold;
 
 				.name {
-					color: #303133;
-					font-size: 14px;
+					color: #000000;
+					font-size: 16px;
+					font-weight: bold;
 					margin: 2px 0px 0px 5px;
 				}
+				
+				.u-tag{
+					margin-top: 10rpx !important;
+					height: 36rpx;
+					line-height: 36rpx;
+					
+					.u-tag__text{
+						font-size: 12px !important;
+					}
+				}
 
 				.detail {
-					color: #000000;
-					font-weight: bold;
+					height: 10px;
+					font-size: 12px;
 					margin: 5px 0px 0px 5px;
 				}
 			}
@@ -242,104 +275,69 @@
 				border: 3px solid #FFFFFF;
 				box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
 			}
-
-			.parent-name {
-				margin-top: 10px;
-				margin-left: 10px;
-				display: flex;
-				flex-direction: column;
-				font-weight: bold;
-
-				.name {
-					color: #6b778d;
-					font-size: 14px;
-					margin: 2px 0px 0px 5px;
-				}
-
-				.detail {
-					color: #3B4144;
-					font-weight: bold;
-					margin: 5px 0px 0px 5px;
-				}
-			}
 		}
 		.userinfo-container{
 				height: 100%;
 				
-				// 面板区域
 				.box-cart{
-					margin: -100rpx 20rpx 20rpx 20rpx;
+					height: 180rpx;
+					padding: 0 4%;
 					display: flex;
-					justify-content: center;
+					justify-content: space-between;
 					align-items: center;
-					justify-content: space-around;
 					
-					.cart-big{
-						border-radius: 15rpx;
-						width: 80px;
-						height: 120px;
-						overflow: hidden;
-						margin: 10px 0 10px 0;
+					.box-cart-item{
+						width: 48%;
+						height: 100%;
+						padding-left: 20rpx;
+						border-radius: 20rpx;
+						background-color: #fff;
 						display: flex;
-						flex-direction: column;
-						justify-content: center;
 						align-items: center;
-						background-color: #FFFFFF;
-						box-shadow: 0 2px 4px rgba(0,0,0,0.05);
+						box-sizing: border-box;
 						
-						.cart-icon{
-							width: 55px;
-							height: 80px;
-							margin: 10px 10px 0px 10px;
+						.t-icon{
+							width: 60rpx !important;
+							height: 60rpx !important;
+							margin-right: 20rpx;
 						}
-						.cart-text{
-							margin: 10px;
-							font-size: 15px;
-						}
-					}
-					
-					.cart-small{
-						width: 65%;
-						height: 130px;
-						display: flex;
-						flex-direction: column;
-						justify-content: space-around;
-						
-						.cart-item{
-							height: 35px;
-							background-color: #FFFFFF;
-							display: flex;
-							flex-direction: row;
-							align-items: center;
-							padding: 10px;
-							border-radius: 15rpx;
-							overflow: hidden;
-							box-shadow: 0 2px 4px rgba(0,0,0,0.05);
+						.card-text{
+							font-size: 16px;
+							font-weight: bolder;
+							margin: 20rpx 0;
+							color: #616161;
 							
-							.cart-icon-sim{
-								width: 50rpx;
-								height: 50rpx;
-								margin: 10px;
-							}
-							.cart-text-sim{
-								margin: 10px;
-								font-size: 15px;
-								color: #3B4144;
+							.card-des{
+								margin-top: 10rpx;
+								font-weight: 400;
+								font-size: 12px;
+								color: #a6aaaf;
 							}
 						}
 					}
+					
+					.left-box{
+						background-image: linear-gradient(to top, #e1f5fd 0%, #e1f5fd 100%);
+					}
+					
+					.right-box{
+						background-image: linear-gradient(to top, #ffebee 0%, #ffebee 100%);
+					}
 				}
+
 				// 功能列表
 				.com-item {
-						margin-top: 20rpx;
+						width: 92%;
+						margin: 20rpx 4% 0 4%;
 				
 						.com-box {
 							overflow: hidden;
+							border-radius: 20rpx;
 						}
 					}
 				
 					.cell {
-						height: 80rpx;
+						height: 100rpx;
 						padding-left: 20rpx;
 						padding-right: 20rpx;
 						display: flex;
@@ -361,9 +359,9 @@
 							align-items: center;
 							padding-left: 20rpx;
 				
-							.cell-icon {
-								width: 50rpx;
-								height: 50rpx;
+							.t-icon {
+								width: 40rpx;
+								height: 40rpx;
 							}
 				
 							.cell-text {
@@ -372,6 +370,15 @@
 								margin-left: 20rpx;
 							}
 						}
+						
+						.cell-right{
+							display: flex;
+							align-items: center;
+							
+							.u-badge{
+								margin-right: 10rpx;
+							}
+						}
 					}
 					.calendar{
 						z-index: 999;