123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <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>
|