首页。我的

This commit is contained in:
2026-01-21 15:19:08 +08:00
parent 8fe0c4d893
commit 1ad538f351
7 changed files with 100 additions and 28 deletions

View File

@@ -10,19 +10,19 @@
<view>用户</view>
<view>{{ userInfo.nickName || userInfo.username || '未登录' }}</view>
</view>
<view class="flex justify-between">
<!-- <view class="flex justify-between">
<view></view>
<view class="cu-btn text-blue margin-top text-bold">切换</view>
</view>
</view> -->
</view>
</view>
<view class="padding" style="background: #EBF2FC;">
<view class="padding page-content" style="background: #EBF2FC;">
<view class="bg-white padding radius">
<view class="flex margin-bottom-xl">
<view class="border-tite"></view>
<view class="margin-left-xs text-bold " >功能菜单</view>
</view>
<view class=" grid col-3 ">
<view class=" grid col-3 grid-square">
<view class="list " v-for="(item, index) in infoList" :key="index" @click="handleMenuClick(item)">
<image style="width: 102rpx;height: 102rpx;" :src="item.src"></image>
<view>{{ item.name}}</view>
@@ -299,6 +299,16 @@
</script>
<style lang="scss" scoped>
.page-content {
background: #EBF2FC;
border-radius: 40rpx 40rpx 0rpx 0rpx;
margin-top: -30rpx;
padding: 30rpx;
padding-bottom: 50rpx;
position: relative;
z-index: 10;
min-height: calc(100vh - 400rpx);
}
.content {}
.grid-list {

View File

@@ -1,21 +1,20 @@
<template>
<view class="title">
<view class="padding">
<view class="text-center">我的</view>
<view class="flex justify-around" style="padding-top:60rpx;" >
<view class="flex">
<view class="cu-avatar xl round margin-left" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg);"></view>
<view>
<view>测试</view>
<view>17374339800</view>
<view class="text-center margin-top-xl text-white text-bold">我的</view>
<view class="flex justify-between align-center" style="padding-top:60rpx;" >
<view class="flex align-center">
<view class="cu-avatar xl round" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg);"></view>
<view class="margin-left">
<view class="text-white text-lg text-bold">hhhrrrr</view>
<view class="text-white" style="opacity: 0.8;">17374339800</view>
</view>
</view>
<button class="bg-blue round cu-btn">编辑资料</button>
<button class="cu-btn round edit-btn bg-blue text-white ">编辑资料</button>
</view>
</view>
</view>
<view class="padding page">
<view class="page-content">
<view class="padding bg-white radius">
<view class="flex justify-between padding-bottom solid-bottom">
<view class="flex " @click="Helpcenter()">
@@ -73,7 +72,32 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, reactive, onMounted } from 'vue'
// 用户信息
const userInfo = reactive({
nickName: '',
phonenumber: ''
});
// // 获取用户信息
// const getUserInfo = () => {
// try {
// const storedUserInfo = uni.getStorageSync('userInfo');
// if (storedUserInfo) {
// const info = JSON.parse(storedUserInfo);
// userInfo.nickName = info.nickName || '';
// userInfo.phonenumber = info.phonenumber || info.username || '';
// }
// } catch (e) {
// console.error('获取用户信息失败:', e);
// }
// };
onMounted(() => {
getUserInfo();
});
//帮助中心
const Helpcenter = () => {
uni.navigateTo({
@@ -120,12 +144,22 @@
</script>
<style lang="scss" scoped>
.page {
// min-height: 100vh;
background: #EBF2FC;
}
.title {
height: 516rpx;
background: radial-gradient( 0% 0% at 78% 8%, #2667E9 0%, #FDFDFD 100%, #719BF0 100%);
}
page {
background: #EBF2FC;
}
.page-content {
background: #EBF2FC;
border-radius: 40rpx 40rpx 0rpx 0rpx;
margin-top: -40rpx;
padding: 30rpx;
padding-bottom: 50rpx;
position: relative;
z-index: 10;
min-height: calc(100vh - 400rpx);
}
.title {
height: 440rpx;
background: linear-gradient(135deg, #2667E9 0%, #4A8AF4 50%, #719BF0 100%);
padding-top: 60rpx;
}
</style>