setUp.vue 3.4 KB
<template>
	<view class="page">
		<view class="box">
			<view class="item" @click="person" data-id="1">
				<view class="left">个人资料</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item" @click="person" data-id="2">
				<view class="left">销售管理</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item" @click="person" data-id="3">
				<view class="left">地址管理</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item" @click="person" data-id="4">
				<view class="left">使用规范</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item" @click="person" data-id="5">
				<view class="left">APP详情</view>
				<view class="right">
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item" @click="register">
				<view class="left">绑定手机</view>
				<view class="right">{{mobile}}
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
			<view class="item">
				<view class="left">版本信息</view>
				<view class="right">1.0.0
					<image src="../../static/right.png" mode="widthFix" />
				</view>
			</view>
		</view>
		<view class="btn">退出登录</view>
	</view>
</template>

<script>
	import app from "../../App.vue";
	export default {
		data() {
			return {
				avatar:'',
				nickname:'',
				mobile:''
			}
		},
		onLoad(options) {
			this.avatar=options.avatar;
			this.nickname=options.nickname;
			this.mobile=options.mobile;
		},
		methods: {
			// 个人资料
			person(e) {
				let id=e.currentTarget.dataset.id;
				if(id==1){
					uni.navigateTo({
						url: '/pages/usercenter/personalData?avatar='+this.avatar+'&nickname='+this.nickname
					})
				}else if(id==2){
					uni.navigateTo({
						url: '/pages/usercenter/sales'
					})
				}else if(id==3){
					uni.navigateTo({
						url: '/pages/usercenter/address'
					})
				}else if(id==4){
					// uni.navigateTo({
					// 	url: '/pages/usercenter/address'
					// })
				}
				
			},
			// 注册、
			register(){
				uni.navigateTo({
					url:'/pages/login/register'
				})
			}
			
			
		}
	}
</script>

<style>
	page {
		background: #F7F7F7;

	}

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

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

	}

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

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

	.right image {
		width: 32rpx;
		margin-left: 16rpx;
	}

	.btn {
		width: 686rpx;
		height: 84rpx;
		background: rgba(194, 148, 69, 1);
		border-radius: 8rpx;
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: rgba(255, 255, 255, 1);
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 100rpx auto;
	}
</style>