sales.vue 3.0 KB
<template>
	<view class="page">
		<view class="infobox">
			<image :src="avatar==''?'../../static/headtou.png':avatar" mode="widthFix" class="avator"></image>
			<view class="word">{{nickname==''?'暂无昵称':nickname}}</view>
		</view>
		<view class="list">
			<view class="item">
				<view class="left">
					<image src="../../static/icond.png" mode="widthFix" class="icon"></image>我的邀请码
				</view>
				<view class="right salecode">
					15621564879
					<image src="../../static/icona.png" mode="widthFix" class="rcion"></image>
				</view>
			</view>
			<view class="item" @click="yeji">
				<view class="left">
					<image src="../../static/iconc.png" mode="widthFix" class="icon"></image>我的业绩
				</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" class="rcion"></image>
				</view>
			</view>
			<view class="item" @click="kehu">
				<view class="left">
					<image src="../../static/iconb.png" mode="widthFix" class="icon"></image>我的客户
				</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" class="rcion"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import app from "../../App.vue";
	export default {
		data() {
			return {
				nickname:'',
				avatar:''
			}
		},
		onLoad() {
			
		},
		methods: {
			yeji() {
				uni.navigateTo({
					url: "/pages/usercenter/myAchievement"
				})
			},
			kehu() {
				uni.navigateTo({
					url: "/pages/usercenter/myCustomer"
				})
			},
			// 获取用户信息
			getuserinfo() {
				let that = this;
				var url = 'member/index';
				var params = {
			
				}
				console.log('7766554', params)
				app.post(url, params).then((res) => {
					console.log(res);
					that.nickname = res.data.data.nickname;
					that.avatar = res.data.data.avatar;
			
			
				}).catch((err) => {
			
				})
			},
		},
		
		onShow() {
			this.getuserinfo()
		}
	}
</script>

<style>
	page {
		background: #F9F9F9;
	}

	.infobox {
		height: 192rpx;
		background: #fff;
		padding: 0 32rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
	}

	.avator {
		width: 128rpx;
		height:128rpx;
		border-radius: 50%;
		margin-right: 28rpx;
	}

	.word {
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: rgba(19, 20, 21, 1);
	}

	.list {
		margin-top: 16rpx;
		padding: 0 32rpx;
		box-sizing: border-box;
		background: #fff;
	}

	.item {
		height: 108rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #EDEDED;
	}

	.left {
		display: flex;
		align-items: center;
		font-size: 28rpx;
		font-family: PingFangHK-Regular, PingFangHK;
		font-weight: 400;
		color: rgba(8, 18, 31, 1);
	}

	.icon {
		width: 44rpx;
		margin-right: 12rpx;

	}

	.right {
		display: flex;
		align-items: center;
		font-size: 2rpx;
		font-family: PingFangHK-Regular, PingFangHK;
		font-weight: 400;
		color: rgba(61, 69, 76, 1);
	}

	.rcion {
		width: 32rpx;
		margin-left: 12rpx;
	}
	.salecode{
		font-size: 28rpx;
	}
</style>