当前位置: 首页 > news >正文

微信小程序实现个人中心页面

文章目录

    • 1. 官方文档教程
    • 2. 编写静态页面
    • 3. 关于作者其它项目视频教程介绍

1. 官方文档教程

  1. https://developers.weixin.qq.com/miniprogram/dev/framework/

2. 编写静态页面

  1. mine.wxml布局文件
<!--index.wxml-->
<navigation-bar title="个人中心" back="{{false}}" color="#ffffff" background="#f7b451"></navigation-bar><scroll-view class="scrollarea" scroll-y type="list"><view class="mine-container"><image src="https://img1.baidu.com/it/u=1167785969,3358198230&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800" mode="" bind:tap="btnUpLoadAvatarHandle" /><view class="user-info-container"><text class="username">wangwu</text><text class="nickname">这个家伙很懒,什么都没有留下~</text></view></view><view class="navigation-center-container"><view class="navigation-collect-container" bind:tap="collectHandle"><image src="../../assets/ic_kf.png" mode="" /><text>官方客服</text></view><view class="navigation-collect-container" bind:tap="onNoteClickHandle"><image src="../../assets/ic_jf.png" mode="" /><text>积分兑换</text></view><view class="navigation-collect-container" bind:tap="collectHandle"><image src="../../assets/ic_bz.png" mode="" /><text>帮助中心</text></view><view class="navigation-collect-container" bind:tap="onNoteClickHandle"><image src="../../assets/ic_sz.png" mode="" /><text>系统设置</text></view></view><view class="line"></view><view class="navigation-item-container" bind:tap="editPwdHandle"><text>修改密码</text><image src="../../assets/ic_right_ror.png" /></view><view class="line2"></view><view class="navigation-item-container" bind:tap="onAboutClickHandle"><text>关于APP</text><image src="../../assets/ic_right_ror.png" /></view><view class="line2"></view><view class="line"></view><view class="navigation-item-container" bind:tap="clearHandle"><text>清理缓存</text><image src="../../assets/ic_right_ror.png" /></view><view class="line2"></view><view class="navigation-item-container"><text>用户条款</text><image src="../../assets/ic_right_ror.png" /></view><view class="line2"></view><view class="navigation-item-container"><text>隐私协议</text><image src="../../assets/ic_right_ror.png" /></view><view class="line2"></view><view class="navigation-exit-container" bind:tap="onExitHandle"><text>退出登录</text></view></scroll-view>

navigation-bar为创建项目,系统提供一个默认的顶部导航栏组件

  1. mine.wxss 样式文件
page {height: 100vh;display: flex;flex-direction: column;background-color: #f5f5f5;
}.scrollarea {flex: 1;overflow-y: hidden;
}.mine-container {display: flex;flex-direction: row;padding: 50rpx;align-items: center;background-color: #f7b451;
}.mine-container image {width: 150rpx;height: 150rpx;border-radius: 50%;
}.user-info-container {display: flex;margin-left: 20rpx;flex-direction: column;}.username {font-weight: 700;font-size: 34rpx;color: white;
}.nickname {color: #999999;margin-top: 20rpx;font-size: 26rpx;color: white;
}.line {display: flex;height: 20rpx;background-color: #f5f5f5;
}.line2 {display: flex;height: 1rpx;background-color: #f5f5f5;
}.navigation-item-container {display: flex;flex-direction: row;justify-content: space-between;align-items: center;height: 80rpx;padding-left: 20rpx;padding-right: 20rpx;background-color: #ffffff;
}.navigation-item-container image {width: 30rpx;height: 30rpx;
}.navigation-item-container text {color: #999999;font-size: 26rpx;
}.navigation-exit-container {display: flex;justify-content: center;margin-top: 150rpx;height: 80rpx;background: #f5f5f5;line-height: 80rpx;color: #999999;font-size: 26rpx;background-color: #ffffff;
}.navigation-center-container {display: flex;flex-direction: row;justify-content: space-around;padding: 40rpx 0;margin-left: 20rpx;margin-right: 20rpx;margin-top: -20rpx;background-color: #ffffff;
}.navigation-collect-container {display: flex;flex-direction: column;align-items: center;}.navigation-center-container image {width: 50rpx;height: 50rpx;
}.navigation-center-container text {margin-top: 10rpx;color: #999999;font-size: 22rpx;
}
  1. 运行效果图

在这里插入图片描述

3. 关于作者其它项目视频教程介绍

本人在b站录制的一些视频教程项目,免费供大家学习

  1. Android新闻资讯app实战:https://www.bilibili.com/video/BV1CA1vYoEad/?vd_source=984bb03f768809c7d33f20179343d8c8
  2. Androidstudio开发购物商城实战:https://www.bilibili.com/video/BV1PjHfeXE8U/?vd_source=984bb03f768809c7d33f20179343d8c8
  3. Android开发备忘录记事本实战:https://www.bilibili.com/video/BV1FJ4m1u76G?vd_source=984bb03f768809c7d33f20179343d8c8&spm_id_from=333.788.videopod.sections
  4. Androidstudio底部导航栏实现:https://www.bilibili.com/video/BV1XB4y1d7et/?spm_id_from=333.337.search-card.all.click&vd_source=984bb03f768809c7d33f20179343d8c8
  5. Android使用TabLayout+ViewPager2实现左右滑动切换:https://www.bilibili.com/video/BV1Mz4y1c7eX/?spm_id_from=333.337.search-card.all.click&vd_source=984bb03f768809c7d33f20179343d8c8
http://www.lryc.cn/news/521336.html

相关文章:

  • Spring Boot中的配置文件有哪些类型
  • Spring Boot 项目启动后自动加载系统配置的多种实现方式
  • 如何在 CentOS 中生成 CSR
  • qml XmlListModel详解
  • C++并发编程之跨应用程序与驱动程序的单生产者单消费者队列
  • PostgreSQL技术内幕22:vacuum full 和 vacuum
  • 【网络】:网络编程套接字
  • java基础概念55-不可变集合
  • 深入理解 C++ 函数重载
  • 相机和激光雷达的外参标定 - 无标定板版本
  • Redis 知识速览
  • LeetCode 热题 100_从前序与中序遍历序列构造二叉树(47_105_中等_C++)(二叉树;递归)
  • 使用sqlplus的easy connect时如何指定是链接到shared server还是dedicated process
  • ubuntu22.4 ROS2 安装gazebo(环境变量配置)
  • 【机器学习:十四、TensorFlow与PyTorch的对比分析】
  • [C++]类与对象(上)
  • 大数据技术实训:Zookeeper集群配置
  • HTML5 加载动画(Loading Animation)
  • C语言进阶-2指针(一)
  • 【人工智能】用Python进行对象检测:从OpenCV到YOLO的全面指南
  • 《深度剖析算法优化:提升效率与精度的秘诀》
  • Mysql--重点篇--索引(索引分类,Hash和B-tree索引,聚簇和非聚簇索引,回表查询,覆盖索引,索引工作原理,索引失效,索引创建原则等)
  • matlab使用 BP 神经网络进行数据预测的完整流程,包括数据读取、数据预处理等等
  • systemd-networkd NetworkManager 介绍
  • 本地部署项目管理工具 Leantime 并实现外部访问
  • PHP cURL 函数初学者完全指南
  • C#中的Array数组,List集合和ArrayList集合--07
  • 基于深度学习的视觉检测小项目(十三) 资源文件的生成和调用
  • 硬件实用技巧:TPS54331DR横杠标识识别1引脚
  • 《C++11》nullptr介绍:从NULL说起