视频加载失败

【uniapp】个人中心页面

1359 字
7 分钟
【uniapp】个人中心页面

先看效果:eyes:#

图片
图片

源码#

01:第一个黄色(图一)#

<template>
<view class="content">
<view class="tops">
<uni-icons type="gear" size="32" class="setIcon" @click="setFun"></uni-icons>
<view class="infos">
<image
src="https://img1.baidu.com/it/u=1665929857,2089570148&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=889"
mode="aspectFill"></image>
<view class="names">
韩信
</view>
<view class="desc">
纵情山河万里,肆意九州五岳,爱恨痴狂,抵不过沧海一笑
</view>
<view class="t-list">
<view class="t-item">
<view class="tit">
收藏
</view>
<view class="vals">
45
</view>
</view>
<view class="t-item">
<view class="tit">
点赞
</view>
<view class="vals">
266
</view>
</view>
<view class="t-item">
<view class="tit">
分享
</view>
<view class="vals">
103
</view>
</view>
</view>
</view>
</view>
<view class="lists">
<uni-list>
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" showArrow title="个人信息" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon2" showArrow title="我的购物车" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon3" showArrow title="用户反馈" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon4" showArrow title="我的邮件" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon5" showArrow title="分享有礼" clickable
@click="clickList" />
</uni-list>
</view>
</view>
</template>
<script>
export default {
data() {
return {
extraIcon1: {
color: '#666666',
size: '22',
type: 'auth'
},
extraIcon2: {
color: '#666666',
size: '22',
type: 'cart'
},
extraIcon3: {
color: '#666666',
size: '22',
type: 'chatboxes'
},
extraIcon4: {
color: '#666666',
size: '22',
type: 'email'
},
extraIcon5: {
color: '#666666',
size: '22',
type: 'gift'
}
}
},
methods: {
setFun() {
uni.showToast({
title: "点击设置",
icon: "none"
})
},
clickList() {
uni.showToast({
title: "点击列表",
icon: "none"
})
}
}
}
</script>
<style scoped>
.tops {
position: relative;
height: 580rpx;
background-color: aquamarine;
background: url("https://img1.baidu.com/it/u=3643237076,897388802&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=400") no-repeat;
background-size: 100% 100%;
}
.setIcon {
position: absolute;
top: 50rpx;
right: 50rpx;
}
.lists {
padding: 20rpx;
}
.tops .infos {
width: 80%;
height: 450rpx;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -25%);
text-align: center;
}
.infos image {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
border: 4rpx solid #fff;
}
.infos .names {
font-size: 34rpx;
color: #333;
font-weight: 700;
margin: 20rpx 0 10rpx;
}
.infos .desc {
max-width: 62%;
font-size: 28rpx;
color: #333;
margin: 10rpx auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.infos .t-list {
margin-top: 60rpx;
display: flex;
justify-content: space-around;
}
.t-item .tit {
font-size: 32rpx;
color: #333;
margin-bottom: 10rpx;
}
.t-item .vals {
font-size: 36rpx;
color: #333;
font-weight: 700;
margin-bottom: 10rpx;
}
/deep/.uni-list-item__content-title[data-v-296a3d7e] {
font-size: 30rpx;
color: #333;
overflow: hidden;
font-weight: 500;
}
/deep/.uni-list-item__container {
padding: 30rpx;
}
</style>

第二个蓝色(图二)#

<template>
<view class="content">
<view class="topBox">
<view class="setbox">
<view class="set-left">
<uni-icons type="calendar" size="30" color="#fff"></uni-icons>
<view class="txt">签到</view>
</view>
<view class="set-right">
<uni-icons type="gear" size="30" color="#fff" @click="setFun"></uni-icons>
<uni-icons type="chat" size="30" color="#fff"></uni-icons>
</view>
</view>
<view class="users">
<view class="u-top">
<image
src="https://img2.baidu.com/it/u=2953585264,744730101&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360"
mode=""></image>
<view class="tit">
登录 / 注册
</view>
</view>
<view class="u-bottom">
<view class="u-item">
<view class="num">12</view>
<view class="u-tit">浏览</view>
</view>
<view class="u-item">
<view class="num">12</view>
<view class="u-tit">浏览</view>
</view>
<view class="u-item">
<view class="num">12</view>
<view class="u-tit">浏览</view>
</view>
</view>
</view>
</view>
<view class="bottomBox">
<view class="order-list">
<view class="o-item">
<image src="../../static/daifuk.png" mode=""></image>
<view class="tit">待付款</view>
</view>
<view class="o-item">
<image src="../../static/daifa.png" mode=""></image>
<view class="tit">待发货</view>
</view>
<view class="o-item">
<image src="../../static/yifa.png" mode=""></image>
<view class="tit">已发货</view>
</view>
<view class="o-item">
<image src="../../static/wancheng.png" mode=""></image>
<view class="tit">已完成</view>
</view>
</view>
</view>
<view class="listBox">
<view class="lists">
<uni-list>
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" showArrow title="个人信息" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon2" showArrow title="我的购物车" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon3" showArrow title="用户反馈" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon4" showArrow title="我的邮件" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon5" showArrow title="分享有礼" clickable
@click="clickList" />
</uni-list>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
extraIcon1: {
color: '#666666',
size: '22',
type: 'auth'
},
extraIcon2: {
color: '#666666',
size: '22',
type: 'cart'
},
extraIcon3: {
color: '#666666',
size: '22',
type: 'chatboxes'
},
extraIcon4: {
color: '#666666',
size: '22',
type: 'email'
},
extraIcon5: {
color: '#666666',
size: '22',
type: 'gift'
},
}
},
methods: {
setFun() {
uni.showToast({
title: "点击设置",
icon: "none"
})
},
clickList() {
uni.showToast({
title: "点击列表",
icon: "none"
})
}
}
}
</script>
<style scoped>
.content {
background-color: #f5f5f5;
height: 100vh;
}
/* 弧形背景 */
.topBox {
width: 100%;
position: relative;
z-index: 1;
overflow: hidden;
padding: 60rpx 20rpx 20rpx;
box-sizing: border-box;
}
.topBox::after {
content: "";
width: 140%;
height: 200px;
position: absolute;
left: -20%;
top: 0;
z-index: -1;
border-radius: 0 0 50% 50%;
background: #00aaff;
}
/* 弧形背景 */
.setbox {
display: flex;
justify-content: space-between;
align-items: center;
}
.set-left {
width: 18%;
display: flex;
justify-content: space-between;
align-items: center;
}
.txt {
color: #fff;
font-size: 30rpx;
}
.set-right .uni-icons {
margin-right: 10rpx;
}
.users {
margin-top: 20rpx;
padding: 30rpx;
box-sizing: border-box;
height: 280rpx;
background-color: #fff;
box-shadow: 1px 10rpx 20rpx #ececec;
border-radius: 12rpx;
}
.u-top {
display: flex;
justify-content: flex-start;
align-items: center;
margin-bottom: 30rpx;
}
.users .u-top image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.u-top .tit {
font-size: 30rpx;
font-weight: 700;
color: #333;
}
.u-bottom {
display: flex;
justify-content: space-around;
align-items: center;
}
.u-item {
text-align: center;
}
.u-item .u-tit {
color: #757575;
font-size: 26rpx;
margin-top: 10rpx;
}
.u-item .num {
color: #000000;
font-size: 33rpx;
font-weight: 700;
}
.bottomBox {
padding: 20rpx;
box-sizing: border-box;
}
.order-list {
height: 200rpx;
margin: -15rpx auto 0;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 12rpx;
display: flex;
justify-content: space-around;
align-items: center;
}
.o-item {
width: 25%;
text-align: center;
}
.o-item image {
width: 65rpx;
height: 55rpx;
}
.o-item .tit {
font-size: 28rpx;
margin-top: 10rpx;
}
.listBox {
height: 200rpx;
margin: -10rpx auto 0;
padding: 20rpx;
box-sizing: border-box;
border-radius: 12rpx;
}
</style>

第三个绿色(图三)#

<template>
<view class="content">
<view class="topBox">
<uni-icons type="gear" size="32" class="setIcon" color="#fff" @click="setFun"></uni-icons>
<image src="https://img0.baidu.com/it/u=464193705,1968194224&fm=253&fmt=auto&app=120&f=JPEG?w=801&h=500" mode="aspectFill"></image>
<view class="userName">
<view class="name">
着逝者为铠
</view>
<view class="desc">
以绝望挥剑,着逝者为铠
</view>
</view>
</view>
<view class="listBox">
<view class="lists">
<uni-list>
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" showArrow title="个人信息" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon2" showArrow title="我的购物车" clickable
@click="clickList" rightText="右侧文字" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon3" showArrow title="用户反馈" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon4" showArrow title="我的邮件" clickable
@click="clickList" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon5" showArrow title="分享有礼" clickable
@click="clickList" />
</uni-list>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
extraIcon1: {
color: '#666666',
size: '22',
type: 'auth'
},
extraIcon2: {
color: '#666666',
size: '22',
type: 'cart'
},
extraIcon3: {
color: '#666666',
size: '22',
type: 'chatboxes'
},
extraIcon4: {
color: '#666666',
size: '22',
type: 'email'
},
extraIcon5: {
color: '#666666',
size: '22',
type: 'gift'
},
}
},
methods: {
setFun() {
uni.showToast({
title: "点击设置",
icon: "none"
})
},
clickList() {
uni.showToast({
title: "点击列表",
icon: "none"
})
}
}
}
</script>
<style scoped>
.content {
box-sizing: border-box;
position: relative;
height: 100vh;
background-color: #00aa7f;
}
.topBox {
height: 350rpx;
padding: 50rpx;
box-sizing: border-box;
display: flex;
justify-content: flex-start;
align-items: center;
}
.topBox image {
width: 130rpx;
height: 130rpx;
border-radius: 50%;
border: 3rpx solid #fff;
margin-right: 30rpx;
}
.topBox .name {
font-size: 42rpx;
color: #fff;
font-weight: 700;
margin-bottom: 23rpx;
}
.topBox .desc {
font-size: 28rpx;
color: #ececec;
margin-bottom: 10rpx;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.listBox {
height: calc(100% - 330rpx);
background-color: #ffffff;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
margin-top: -20rpx;
padding: 30rpx 20rpx;
}
.setIcon {
position: absolute;
top: 50rpx;
right: 50rpx;
}
</style>

最后,页面中用到了一些本地图片和uniapp的组件,为了更好的一键复制使用,我把整体源码-包含上期的登录页面源码和个人中心页面放在了gitee上,如有需要的话,下面附上此项目gitee地址:https://gitee.com/xt-123/uniapp-pages

支持与分享

如果这篇文章对你有帮助,欢迎分享给更多人或打赏支持!

打赏
【uniapp】个人中心页面
https://blog.huhaha.vip/posts/a6b86d8c/
作者
小王的博客
发布于
2024-08-11
许可协议
CC BY-NC-SA 4.0
相关文章智能推荐
1
【前端】高颜值登录页面(一键复制)
前端登录页面是每一个项目不可缺少的页面,是一个应用的门面,首次进入看见的可能就是登录界面,做了这么久的前端,发现登录界面其实都大同小异,有时候没必要从头写,我写了几个自认为比较好看的uniapp登录界面记录一下,下次用到的话,可以直接复制过来,修改下就行了.只有静态页面,并未做逻辑上的东西,这样便于在此基础上做调整。
2
【uniapp】小程序滚动tab
前端本文档详细介绍了如何使用 UniApp 实现一个滚动的 Tab 栏。滚动 Tab 栏在小程序中非常常见,适用于需要展示多个选项卡且每个选项卡内容较多的情况。本文将通过两个不同的实现方式(文字版和图片版)来展示如何实现这一功能。
3
PC端登录页源码(一键复制)
前端登录页面是每一个项目不可缺少的页面,是一个应用的门面,首次进入看见的可能就是登录界面,做了这么久的前端,发现登录界面其实都大同小异,有时候没必要从头写,我写了几个自认为比较好看的uniapp登录界面记录一下,下次用到的话,可以直接复制过来,修改下就行了.只有静态页面,并未做逻辑上的东西,这样便于在此基础上做调整。
4
分享一个非常好用的loading效果网站
前端本文介绍了一个非常实用的加载效果网站,适合前端开发者寻找和使用各种加载动画。以下是文章的详细内容
5
Linux 磁盘空间检查与新硬盘挂载完整指南
Linux本文详细介绍了在 Linux(银河麒麟 V10)环境下挂载新硬盘前的磁盘空间检查方法,以及完整的硬盘分区、格式化、挂载、开机自动挂载配置流程,同时解决了普通用户无 root 权限操作挂载目录的常见问题。
随机文章随机推荐

评论区

Profile Image of the Author
小王的博客
一个上了年纪的猿人.
分类
标签
最新动态
站点统计
文章
209
分类
15
标签
161
总字数
478,322
运行时长
0
最后活动
0 天前
站点信息
构建平台
Vercel
博客版本
Firefly v6.16.7
文章许可
CC BY-NC-SA 4.0
文章目录