295 lines
6.5 KiB
Plaintext
295 lines
6.5 KiB
Plaintext
<template>
|
|
<view class="page">
|
|
|
|
<!-- 设置列表 -->
|
|
<view class="settings-list">
|
|
<!-- 账户安全 -->
|
|
<view class="settings-section" >
|
|
<view class="section-title">账户安全</view>
|
|
<view v-for="(accountItem,accountIndex) in account" :key="accountIndex" class="section-item">
|
|
<view class="" style="display: flex; align-items: center;">
|
|
<view class="icon" style=" ">
|
|
<img class="icon-img" :src="Service.GetIconImg(accountItem.icon)"
|
|
alt="" />
|
|
</view>
|
|
<text style="margin-left: 14rpx; font-weight: 500; " >{{accountItem.name}}</text>
|
|
</view>
|
|
<view class="" style="display: flex; align-items: baseline; font-size: 24rpx; color: #9CA3AF; " >
|
|
<text v-if="accountItem.name=='实名认证'" style="margin-right: 10rpx;" >未认证</text>
|
|
<text v-if="accountItem.name=='绑定社交账号'" style="margin-right: 10rpx;" >小红书、微博</text>
|
|
<up-icon name="arrow-right" size="12"></up-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 应用设置 -->
|
|
<view class="settings-section">
|
|
<view class="section-title">应用设置</view>
|
|
<view v-for="(appItem,appIndex) in app" :key="appIndex" class="section-item">
|
|
<view class="" style="display: flex; align-items: center;">
|
|
<view class="icon" style=" ">
|
|
<img class="icon-img" :src="Service.GetIconImg(appItem.icon)"
|
|
alt="" />
|
|
</view>
|
|
<text style="margin-left: 14rpx; font-weight: 500; " >{{appItem.name}}</text>
|
|
</view>
|
|
<view class="" style="display: flex; align-items: baseline; font-size: 24rpx; color: #9CA3AF; " >
|
|
<text v-if="appItem.name=='清除缓存'" style="margin-right: 10rpx;" >46.8MB</text>
|
|
<up-icon name="arrow-right" size="12"></up-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 支持与帮助 -->
|
|
<view class="settings-section">
|
|
<view class="section-title">支持与帮助</view>
|
|
<view v-for="(helpItem,helpIndex) in help" :key="helpIndex" class="section-item">
|
|
<view class="" style="display: flex; align-items: center;">
|
|
<view class="icon" style=" ">
|
|
<img class="icon-img" :src="Service.GetIconImg(helpItem.icon)"
|
|
alt="" />
|
|
</view>
|
|
<text style="margin-left: 14rpx; font-weight: 500; " >{{helpItem.name}}</text>
|
|
</view>
|
|
<view class="" style="display: flex; align-items: baseline; font-size: 24rpx; color: #9CA3AF; " >
|
|
<up-icon name="arrow-right" size="12"></up-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 版本信息 -->
|
|
<view class="version-info">
|
|
<text class="version-text">当前版本</text>
|
|
<view class="" style="display: flex; align-items: center;" >
|
|
<text class="version-number">v1.0.0</text>
|
|
<view class="check-update">检查更新</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="" style="width: 100%; height: 100rpx;" >
|
|
|
|
</view>
|
|
|
|
<!-- 退出登录按钮 -->
|
|
<view class="" style=" width: 100%; position: fixed; bottom: 0; left: 0; background-color: #f5f5f5; padding: 20rpx 30rpx; " >
|
|
<view class="" style="width: 100%; color: #fff; background-color: #FF6A00; padding: 20rpx ; text-align: center; border-radius: 20rpx; " >
|
|
退出登录
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue';
|
|
import { Service } from '@/Service/Service'
|
|
|
|
|
|
|
|
|
|
const account = ref([
|
|
{
|
|
name: '实名认证',
|
|
icon: '/static/userFunc/set/security.png'
|
|
}, {
|
|
name: '修改密码',
|
|
icon: '/static/userFunc/set/password.png'
|
|
}
|
|
])
|
|
|
|
const app=ref([
|
|
{
|
|
name: '消息推送',
|
|
icon: '/static/userFunc/set/notice.png'
|
|
},
|
|
{
|
|
name: '清除缓存',
|
|
icon: '/static/userFunc/set/dele.png'
|
|
}
|
|
])
|
|
|
|
const help=ref([
|
|
{
|
|
name: '用户协议',
|
|
icon: '/static/userFunc/set/agreement.png'
|
|
},
|
|
{
|
|
name: '隐私政策',
|
|
icon: '/static/userFunc/set/privacy.png'
|
|
},
|
|
{
|
|
name: '联系客服',
|
|
icon: '/static/userFunc/set/service.png'
|
|
}
|
|
])
|
|
|
|
|
|
const handleClearCache = () => {
|
|
uni.showModal({
|
|
title: '清除缓存',
|
|
content: '确定要清除所有缓存数据吗?',
|
|
success: (res) => {
|
|
|
|
}
|
|
});
|
|
};
|
|
|
|
|
|
|
|
const handleLogout = () => {
|
|
uni.showModal({
|
|
title: '退出登录',
|
|
content: '确定要退出当前账号吗?',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
|
|
}
|
|
}
|
|
});
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.page {
|
|
background-color: #f5f5f5;
|
|
overflow: hidden;
|
|
height: 100vh;
|
|
}
|
|
|
|
|
|
// 图标
|
|
.icon {
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
border-radius: 50%;
|
|
background-color: #FFEDD5;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.icon-img {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
}
|
|
|
|
/* 用户信息卡片 */
|
|
.user-card {
|
|
margin: 30rpx;
|
|
border-radius: 20rpx;
|
|
background: linear-gradient(to right,#F97316,#FB923C);
|
|
padding: 40rpx 30rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 30rpx;
|
|
}
|
|
|
|
.user-avatar {
|
|
background-color: #FFFFFF;
|
|
padding: 10rpx;
|
|
}
|
|
|
|
.user-info {
|
|
margin-left: 30rpx;
|
|
flex: 1;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 32rpx;
|
|
color: #FFFFFF;
|
|
font-weight: 500;
|
|
margin-bottom: 10rpx;
|
|
display: block;
|
|
}
|
|
|
|
.user-level {
|
|
width: fit-content;
|
|
font-size: 18rpx;
|
|
color: #fff;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
padding: 4rpx 20rpx;
|
|
border-radius: 24rpx;
|
|
}
|
|
|
|
/* 设置列表 */
|
|
.settings-list {
|
|
padding: 0 30rpx;
|
|
}
|
|
|
|
.settings-section {
|
|
background-color: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
margin-bottom: 30rpx;
|
|
overflow: hidden;
|
|
padding: 30rpx;
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 28rpx;
|
|
color: #6B7280;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.section-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20rpx 0;
|
|
border-bottom: 1rpx solid #e2e2e2;
|
|
|
|
&:last-child{
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
|
|
.u-cell {
|
|
height: 100rpx;
|
|
font-size: 32rpx;
|
|
--u-cell-value-color: #999999;
|
|
--u-cell-title-color: #333333;
|
|
--u-cell-arrow-size: 40rpx;
|
|
}
|
|
|
|
/* 版本信息 */
|
|
.version-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 30rpx;
|
|
background-color: #FFFFFF;
|
|
border-radius: 20rpx;
|
|
margin-bottom: 60rpx;
|
|
|
|
}
|
|
|
|
.version-text {
|
|
font-size: 28rpx;
|
|
color: #333333;
|
|
}
|
|
|
|
.version-number {
|
|
font-size: 28rpx;
|
|
color: #999999;
|
|
margin-right: 10rpx;
|
|
}
|
|
|
|
.check-update {
|
|
font-size: 24rpx;
|
|
color: #FF6600;
|
|
background-color: #FFF7ED;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 6rpx 16rpx;
|
|
border-radius: 15rpx;
|
|
}
|
|
|
|
/* 退出登录按钮 */
|
|
.logout-btn {
|
|
margin: 0 30rpx;
|
|
}
|
|
</style> |