Files
threeonecheck_web/pages/personalcenter/my.vue
2026-01-21 15:19:08 +08:00

165 lines
5.0 KiB
Vue

<template>
<view class="title">
<view class="padding">
<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="cu-btn round edit-btn bg-blue text-white ">编辑资料</button>
</view>
</view>
</view>
<view class="page-content">
<view class="padding bg-white radius">
<view class="flex justify-between padding-bottom solid-bottom">
<view class="flex " @click="Helpcenter()">
<image src="/static/my/Helpcenter.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">帮助中心</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex">
<image src="/static/my/CustomerService.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">智能客服</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex" @click="Account()">
<image src="/static/my/Account.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">账号安全</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex" @click="notification()">
<image src="/static/my/Notification.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">新消息通知</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex">
<image src="/static/my/Delete.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">清除缓存</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex" @click="Settings()">
<image src="/static/my/Settings.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">通用设置</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
<view class="flex justify-between padding-bottom padding-top solid-bottom">
<view class="flex">
<image src="/static/my/Helpcenter.png" style="width:40rpx;height: 40rpx;"></image>
<view class="margin-left">关于</view>
</view>
<view class="lg text-gray cuIcon-right"></view>
</view>
</view>
<button class=" bg-blue round margin-top-xl " @click="handleLogout()">退出登录</button>
</view>
</template>
<script setup>
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({
url:'/pages/personalcenter/helpcenter'
})
}
//新消息通知
const notification = () => {
uni.navigateTo({
url:'/pages/personalcenter/notification'
})
}
//通用设置
const Settings = () => {
uni.navigateTo({
url:'/pages/personalcenter/settings'
})
}
//账号安全
const Account = () => {
uni.navigateTo({
url:'/pages/personalcenter/account'
})
}
//退出登录
const handleLogout = () => {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
uni.clearStorageSync()
uni.reLaunch({
url:'/pages/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
</script>
<style lang="scss" scoped>
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>