简单的微信小程序个人 个人详情页

一、示例

1.个人页面

2.个人详情页面

二、示例代码

1.wxml页面

复制代码
<!--pages/user/user.wxml-->
<view class="mine-wrapper">
  <view class="avatar-wrapper">
    <view>
      <view class="avatar">
      
        <image style="border-radius:50%;" src="{{pic}}"></image>
      </view>
      <view class="text">
        <text wx:if="{{username}}">{{username}}</text>
        <text wx:else bindtap="toLogin">注册 / 登录</text>
      </view>
    </view>
  </view>
  <view class="list-wrapper">
  <view>
    <view bindtap="my" class="lists">
        <view class='content'> 
          <view class="listimg">
            <image src="/images/用户.png"></image>
          </view>
          <view class="listtext">个人资料</view>
          <view class="listicon">{{item.tips}}</view>
          <view class="arrows">
            <image src="/images/右_right.png"></image>
          </view>
        </view>
    </view>
        <!-- 分割线 -->
        <view class="divLine"></view>
  </view>

    <view class="alllists">
      <block wx:for="{{menuitems}}" wx:key="menu_for">
        <navigator url="{{item.url}}" class="lists">
        <view class='content'> 
          <view class="listimg">
            <image src="{{item.icon}}"></image>
          </view>
          <view class="listtext">{{item.text}}</view>
          <view class="listicon">{{item.tips}}</view>
          <view class="arrows">
            <image src="{{item.arrows}}"></image>
          </view>
        </view>
        </navigator>
        <!-- 分割线 -->
        <view class="divLine"></view>
      </block>
    </view>
  </view>

  <view class="btn" >
    <button style="color: rgb(8, 8, 8); background-color: rgb(11, 247, 70); "  bind:tap="lout">退出登录</button>
    </view> 
</view>

2.scss页面 部分

复制代码
.banner{
  width: 100%;
  height: 460rpx;
  .pic{
    width: 100%;
    height: 100%;
  }
}
.content{
  .body{
    padding:50rpx 30rpx;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    .box{
      width: 330rpx;     
      margin-bottom:30rpx; 
    }
  }
相关推荐
哈__2 分钟前
React Native 鸿蒙跨平台开发:PixelRatio 像素适配
javascript·react native·react.js
用户63879947730536 分钟前
每组件(Per-Component)与集中式(Centralized)i18n
前端·javascript
SsunmdayKT36 分钟前
React + Ts eslint配置
前端
开始学java39 分钟前
useEffect 空依赖 + 定时器 = 闭包陷阱?count 永远停在 1 的坑我踩透了
前端
zerosrat39 分钟前
从零实现 React Native(2): 跨平台支持
前端·react native
狗哥哥40 分钟前
🔥 Vue 3 项目深度优化之旅:从 787KB 到极致性能
前端·vue.js
青莲84341 分钟前
RecyclerView 完全指南
android·前端·面试
青莲84341 分钟前
Android WebView 混合开发完整指南
android·前端·面试
GIS之路1 小时前
GDAL 实现矢量数据转换处理(全)
前端
大厂技术总监下海1 小时前
Rust的“一发逆转弹”:Dioxus 如何用一套代码横扫 Web、桌面、移动与后端?
前端·rust·开源