Browse Source

2021-8-31

xiemingyang 3 years ago
parent
commit
e323cdefa4
6 changed files with 252 additions and 13 deletions
  1. 1 1
      api/user.js
  2. 78 7
      pages.json
  3. 162 0
      pages/user/shezhi.vue
  4. 8 2
      pages/user/submit.vue
  5. 1 1
      pages/user/user.vue
  6. 2 2
      pages/user/withdraw.vue

+ 1 - 1
api/user.js

@@ -13,7 +13,7 @@ export function orderData(data) {
 // 获取用户信息
 export function getUserInfo(data) {
 	return request({
-		url: '/api/userinfo',
+		url: '/api/user',
 		method: 'get',
 		data
 	});

+ 78 - 7
pages.json

@@ -137,25 +137,96 @@
 			{
 				"path": "pages/user/accounts",
 				"style": {
-					"navigationBarTitleText": "我的佣金"
-				}
-			},
+						"navigationBarTextStyle": "black",
+						"navigationBarBackgroundColor": "transparent",
+						"app-plus": {
+								"titleNView": {
+										"type": "float",
+										"titleText": "我的佣金"
+									}
+							}
+					}
+				},
+				{
+					"path": "pages/user/balance",
+					"style": {
+							"navigationBarTextStyle": "black",
+							"navigationBarBackgroundColor": "transparent",
+							"app-plus": {
+									"titleNView": {
+											"type": "float",
+											"titleText": "我的钱包"
+										}
+								}
+						}
+					},
+					{
+						"path": "pages/user/integral",
+						"style": {
+								"navigationBarTextStyle": "black",
+								"navigationBarBackgroundColor": "transparent",
+								"app-plus": {
+										"titleNView": {
+												"type": "float",
+												"titleText": "我的积分"
+											}
+									}
+							}
+						},
+						{
+							"path": "pages/user/extend",
+							"style": {
+									"navigationBarTextStyle": "black",
+									"navigationBarBackgroundColor": "transparent",
+									"app-plus": {
+											"titleNView": {
+													"type": "float",
+													"titleText": "我的推广"
+												}
+										}
+								}
+							},
 			{
 				"path": "pages/user/transfer",
 				"style": {
-					"navigationBarTitleText": "佣金转账"
+					"navigationBarTitleText": "佣金转账",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
+			
 				}
 			},
 			{
 				"path": "pages/user/submit",
 				"style": {
-					"navigationBarTitleText": "提交成功"
+					"navigationBarTitleText": "提交成功",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
+			
 				}
 			},
 			{
 				"path": "pages/user/withdraw",
 				"style": {
-					"navigationBarTitleText": "提现"
+					"navigationBarTitleText": "提现",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
+			
+				}
+			},
+			{
+				"path": "pages/user/refer",
+				"style": {
+					"navigationBarTitleText": "提交申请",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
+				}
+			},
+			{
+				"path": "pages/user/shezhi",
+				"style": {
+					"navigationBarTitleText": "设置",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
 				}
 			},
 			{
@@ -164,7 +235,7 @@
 					"navigationBarTitleText": "品牌故事",
 					"navigationBarBackgroundColor": "#fff",
 					"navigationBarTextStyle": "black"
-
+			
 				}
 			},
 			{

+ 162 - 0
pages/user/shezhi.vue

@@ -0,0 +1,162 @@
+<template>
+	<view class="container">
+		<!-- 头像 -->
+		<view class="touxiang">
+			<view class="tou">头像</view>
+			<view class="avatar"><image :src=" userInfo.avatar || '../../static/error/missing-face.png' "></image></view>
+		</view>
+		<!-- 昵称 -->
+		<view class="nicheng">
+			<view class="text">昵称</view>
+				<view class="username">{{ userInfo.nickname || '游客' }}</view>
+		</view>
+		<view class="yaoqing">
+			<view class="ma">邀请码</view>
+			<view class="shu">102320</view>
+			</view>
+			<view class="zhanghu">
+				<view class="qq">账户</view>
+				<view class="number">13911111111</view>
+				</view>
+			<view class="btn"><text>退出登录</text></view>
+	</view>
+</template>
+
+<script>
+import { edit } from '@/api/user'
+export default {
+	data () {
+		return {
+			userInfo: {}
+		}
+	},
+	created () {
+		this.loadUser ()
+	},
+	methods: {
+		nav (url) {
+			uni.navigateTo({
+				url
+			})
+		},
+		
+		async loadUser () {
+			const { data } = await edit ()
+			console.log(data)
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+	.container {
+		background-color: #F2F3F5;
+		width: 750rpx;
+		height: 1334rpx;
+		.touxiang {
+			height: 120rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			.tou {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.avatar {
+				image {
+					width: 80rpx;
+					height: 80rpx;
+					border-radius: 50%;
+					margin-right: 25rpx;
+				}
+			}
+		}
+		.nicheng {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			border-bottom: 1rpx solid #F0F0F0;
+			margin-top: 20rpx;
+			.text {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.username {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.yaoqing {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			border-bottom: 1rpx solid #F0F0F0;
+			.ma {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.shu {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.zhanghu {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			.qq {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.number {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.btn {
+			width: 560rpx;
+			height: 80rpx;
+			background: #6EAB4E;
+			border-radius: 40rpx;
+			margin-top: 157rpx;
+			margin-left: 95rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			text {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 8 - 2
pages/user/submit.vue

@@ -3,7 +3,7 @@
 			<image class="img" src="../../static/img/img34.png" mode="scaleToFill"></image>
 			<view class="text">提交成功</view>
 			<view class="btm">
-				<view class="btn">返回首页</view>
+				<view class="btn" @click="nav('pages/index/index')">返回首页</view>
 			</view>
 	</view>
 </template>
@@ -13,7 +13,13 @@ export default {
 	data () {
 		return {}
 	},
-	methods: {}
+	methods: {
+		nav (url) {
+			uni.navigateTo({
+				url
+			})
+		} 
+	}
 }
 </script>
 

+ 1 - 1
pages/user/user.vue

@@ -15,7 +15,7 @@
 					</view>
 				</view>
 				<!-- 设置 -->
-				<view class="infor-right">
+				<view class="infor-right" @click="nav('/pages/user/shezhi')">
 					<image src="../../static/img/img18.png" mode="scaleToFill"></image>
 					<view class="setting">设置</view>
 				</view>

+ 2 - 2
pages/user/withdraw.vue

@@ -42,8 +42,8 @@
 					</view>
 				</label>
 			</radio-group>
-			<view class="btn">
-				<view class="title" @click="nav('/pages/user/refer')">提交申请</view>
+			<view class="btn" @click="nav('/pages/user/refer')">
+				<view class="title" >提交申请</view>
 			</view>
 		</view>
 	</view>