<template>
|
|
<view class="user-container">
|
|
<!-- 顶部背景区域 -->
|
|
<view class="header-bg" @click="goLogin">
|
|
<!-- 用户信息区域 -->
|
|
<view class="user-info">
|
|
<view class="avatar-section">
|
|
<image class="avatar" :src="userInfo.avatar" mode="aspectFill"></image>
|
|
</view>
|
|
<view class="info-section">
|
|
<text class="username">{{userInfo.username}}</text>
|
|
<text class="user-id">ID:{{userInfo.userId}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 常用功能模块 -->
|
|
<view class="function-card">
|
|
<view class="card-title">
|
|
<text class="title-text">常用功能</text>
|
|
</view>
|
|
|
|
<view class="function-list">
|
|
<!-- 基本信息 -->
|
|
<view class="function-item" @click="goToBasicInfo">
|
|
<view class="item-left">
|
|
<uv-icon name="account" size="28" color="#C70019"></uv-icon>
|
|
<text class="item-text">基本信息</text>
|
|
</view>
|
|
<uv-icon name="arrow-right" size="24" color="#000"></uv-icon>
|
|
</view>
|
|
|
|
<!-- 用户协议和隐私政策 -->
|
|
<view class="function-item" @click="showPrivacyPolicy">
|
|
<view class="item-left">
|
|
<uv-icon name="file-text" size="28" color="#C70019"></uv-icon>
|
|
<text class="item-text">用户协议和隐私政策</text>
|
|
</view>
|
|
<uv-icon name="arrow-right" size="24" color="#000"></uv-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 用户协议和隐私政策弹窗 -->
|
|
<uv-modal ref="privacyModal" title="用户协议和隐私政策" :show-cancel-button="false" confirm-text="我知道了" confirm-color="#C70019">
|
|
<view class="privacy-content">
|
|
<view>
|
|
待补充
|
|
</view>
|
|
</view>
|
|
</uv-modal>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
userInfo: {
|
|
avatar: '/static/默认头像.png',
|
|
username: '请先登录',
|
|
userId: 'XXXXX'
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
// 跳转登录页面
|
|
goLogin() {
|
|
uni.navigateTo({
|
|
url: '/subPages/login/login'
|
|
})
|
|
},
|
|
// 跳转到基本信息页面
|
|
goToBasicInfo() {
|
|
uni.navigateTo({
|
|
url: '/subPages/user/profile'
|
|
})
|
|
},
|
|
|
|
// 显示隐私政策弹窗
|
|
showPrivacyPolicy() {
|
|
this.$refs.privacyModal.open()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.privacy-content {
|
|
padding: 20rpx;
|
|
|
|
.privacy-section {
|
|
margin-bottom: 30rpx;
|
|
|
|
.section-title {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
color: #333;
|
|
display: block;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.section-text {
|
|
font-size: 28rpx;
|
|
color: #666;
|
|
line-height: 1.6;
|
|
display: block;
|
|
margin-bottom: 15rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.user-container {
|
|
|
|
min-height: 100vh;
|
|
background: #f5f5f5;
|
|
position: relative;
|
|
}
|
|
|
|
.header-bg {
|
|
height: 513rpx;
|
|
background: linear-gradient(156deg, #f56073 15%, #c70019 61%, #ffacb6 100%);
|
|
position: relative;
|
|
padding: 0 46rpx;
|
|
|
|
.user-info {
|
|
display: flex;
|
|
align-items: center;
|
|
padding-top: 177rpx;
|
|
|
|
.avatar-section {
|
|
margin-right: 22rpx;
|
|
|
|
.avatar {
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
border-radius: 60rpx;
|
|
// border: 4rpx solid rgba(255, 255, 255, 0.3);
|
|
}
|
|
}
|
|
|
|
.info-section {
|
|
flex: 1;
|
|
|
|
.username {
|
|
display: block;
|
|
font-size: 30rpx;
|
|
// font-weight: bold;
|
|
color: #fff;
|
|
margin-bottom: 12rpx;
|
|
}
|
|
|
|
.user-id {
|
|
font-size: 28rpx;
|
|
color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.function-card {
|
|
width: 88%;
|
|
height: 709rpx;
|
|
background: #ffffff;
|
|
border-radius: 16rpx;
|
|
margin: -152rpx auto 0;
|
|
position: relative;
|
|
z-index: 2;
|
|
padding: 57rpx 28rpx;
|
|
|
|
.card-title {
|
|
// margin-bottom: 40rpx;
|
|
|
|
.title-text {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
color: $primary-text-color;
|
|
}
|
|
}
|
|
|
|
.function-list {
|
|
.function-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top:44rpx ;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
|
|
.item-left {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.item-text {
|
|
font-size: 28rpx;
|
|
color: $primary-text-color;
|
|
margin-left: 14rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|