7.个人中心页面

个人中心页面

模仿微信
uview官网
https://xuqu.gitee.io/layout/intro.html
用此模板进行改进

下载插件后找到wxCenter
复制页面至mine

代码如下

<template>
  <view>
    <u-navbar :is-back="false" title=" " :border-bottom="false">
      <view class="u-flex u-row-right" style="width: 100%;">
        <view class="camera u-flex u-row-center">
          <!-- 黑色相机 -->
          <u-icon name="camera-fill" color="#000" size="48"></u-icon>
        </view>
      </view>
    </u-navbar>
    <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
      <view class="u-m-r-10">
        <u-avatar :src="pic" size="140"></u-avatar>
      </view>
      <view class="u-flex-1">
        <view class="u-font-18 u-p-b-20">uview ui</view>
        <view class="u-font-14 u-tips-color">微信号</view>
      </view>
      <view class="u-m-l-10 u-p-10">
        <u-icon name="scan" color="#969799" size="28"></u-icon>
      </view>
      <view class="u-m-l-10 u-p-10">
        <u-icon name="arrow-right" color="#969799" size="28"></u-icon>
      </view>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="rmb-circle" title="支付"></u-cell-item>
      </u-cell-group>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="star" title="收藏"></u-cell-item>
        <u-cell-item icon="photo" title="相册"></u-cell-item>
        <u-cell-item icon="star" title="收藏"></u-cell-item>
        <u-cell-item icon="star" title="收藏"></u-cell-item>
      </u-cell-group>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="setting-fill" title="个人设置"></u-cell-item>
      </u-cell-group>
    </view>
  </view>
</template>

<script setup>
  import {
    ref
  } from 'vue';
  const pic = ref('https://uviewui.com/common/logo.png')
  const show = ref(true)
</script>

<style lang="scss">
  page {
    background-color: #ededed;
  }

  .camera {
    width: 54px;
    height: 44px;

    &:active {
      background-color: #ededed;
      //点击后灰色
    }
  }

  .user-box {
    background-color: #fff;
  }
</style>

效果图

手机:
在这里插入图片描述

微信开发者:

在这里插入图片描述

修改页面

修改图标
官网
https://xuqu.gitee.io/components/icon.html

修改如下

mine.vue

<template>
  <view>
    <!-- 黑色相机 -->
   <!-- <u-navbar :is-back="false" title=" " :border-bottom="false">
      <view class="u-flex u-row-right" style="width: 100%;">
        <view class="camera u-flex u-row-center">
          <u-icon name="camera-fill" color="#000" size="48"></u-icon>
        </view>
      </view>
    </u-navbar> -->
    <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-22 u-p-22" >
      <view class="u-m-r-10">
        <u-avatar :src="pic" size="160"></u-avatar>
      </view>
      <view class="u-flex-1">
        <view class="u-font-18 u-p-b-20 u-p-l-20">测试001</view>
        <view class="u-font-14 u-tips-color u-p-l-20">微信号:测试001</view>
      </view>
      <view class="u-m-l-10 u-p-10">
        <u-icon name="scan" color="#969799" size="28"></u-icon>
      </view>
      <view class="u-m-l-10 u-p-10">
        <u-icon name="arrow-right" color="#969799" size="28"></u-icon>
      </view>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="rmb-circle" title="支付"></u-cell-item>
      </u-cell-group>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="thumb-up" title="我的发布"></u-cell-item>
        <u-cell-item icon="shopping-cart" title="我的求购"></u-cell-item>
        <u-cell-item icon="star" title="我的收藏"></u-cell-item>
        <u-cell-item icon="order" title="购买订单"></u-cell-item>
        <u-cell-item icon="car" title="出售订单"></u-cell-item>
        <u-cell-item icon="lock-open" title="修改密码"></u-cell-item>
        
      </u-cell-group>
    </view>

    <view class="u-m-t-20">
      <u-cell-group>
        <u-cell-item icon="setting" title="个人设置"></u-cell-item>
        <u-cell-item icon="close-circle" title="退出账号"></u-cell-item>
      </u-cell-group>
    </view>
  </view>
</template>

<script setup>
  import {
    ref
  } from 'vue';
  const pic = ref('/static/user.jpg')
  const show = ref(true)
</script>

<style lang="scss">
  page {
    background-color: #ededed;
  }

  .camera {
    width: 54px;
    height: 44px;

    &:active {
      background-color: #ededed;
      //点击后灰色
    }
  }

  .user-box {
    background-color: #fff;
  }
</style>

效果图

在这里插入图片描述

  • 25
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值