|
|
@ -1,115 +1,146 @@ |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
<navbar/> |
|
|
|
<view> |
|
|
|
<view class="page" v-if="isLogin && !showLogoutModal"> |
|
|
|
|
|
|
|
<view class="user"> |
|
|
|
<!-- 用户信息区域 --> |
|
|
|
<view class="user-info"> |
|
|
|
<image class="avatar" src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image> |
|
|
|
<view class="info"> |
|
|
|
<view class="name">战斗世界 <text class="id">(ID: 50523541)</text></view> |
|
|
|
<view class="desc">世界达人,小说控</view> |
|
|
|
<view class="phone">手机号:19898474531</view> |
|
|
|
</view> |
|
|
|
<view class="more"> |
|
|
|
<uv-icon name="more-dot-fill" size="46rpx" color="#999"></uv-icon> |
|
|
|
|
|
|
|
<view class="user"> |
|
|
|
<!-- 用户信息区域 --> |
|
|
|
<view class="user-info"> |
|
|
|
<image class="avatar" src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image> |
|
|
|
<view class="info"> |
|
|
|
<view class="name">战斗世界 <text class="id">(ID: 50523541)</text></view> |
|
|
|
<view class="desc">世界达人,小说控</view> |
|
|
|
<view class="phone">手机号:19898474531</view> |
|
|
|
</view> |
|
|
|
<view class="more"> |
|
|
|
<uv-icon name="more-dot-fill" size="46rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 图片区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">账户</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Walletflow')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="photo" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>钱包流水</text> |
|
|
|
|
|
|
|
<!-- 图片区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">账户</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Walletflow')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="photo" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>钱包流水</text> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Giftbox')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="gift" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>礼物盒</text> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Giftbox')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="gift" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>礼物盒</text> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 日常区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">日常</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Mycomment')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="chat" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>我的评论</text> |
|
|
|
|
|
|
|
<!-- 日常区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">日常</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Mycomment')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="chat" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>我的评论</text> |
|
|
|
</view> |
|
|
|
<view class="badge">294</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="badge">294</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages/tasks')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="list" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>任务中心</text> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Translation')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="list" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>任务中心</text> |
|
|
|
</view> |
|
|
|
<view class="badge">5</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="badge">5</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 设置区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">设置</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/creator')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>申请成为作者</text> |
|
|
|
|
|
|
|
<!-- 设置区域 --> |
|
|
|
<view class="section"> |
|
|
|
<view class="section-title">设置</view> |
|
|
|
<view class="section-list"> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/creator')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>申请成为作者</text> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages/customer-service')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>联系客服</text> |
|
|
|
|
|
|
|
<view class="section-item" @click="navigateToPage('/pages/customer-service')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>联系客服</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages/edit-info')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="edit-pen" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>修改信息</text> |
|
|
|
<view class="section-item" @click="navigateToPage('/pages_order/novel/Modifyinformation')"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="edit-pen" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>修改信息</text> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<view class="section-item" @click="logout"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>退出登录</text> |
|
|
|
<view class="section-item" @click="logout"> |
|
|
|
<view class="section-item-left"> |
|
|
|
<uv-icon name="star" size="40rpx" color="#333"></uv-icon> |
|
|
|
<text>退出登录</text> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<tabber select="center" /> |
|
|
|
<tabber select="center" /> |
|
|
|
</view> |
|
|
|
<view v-else-if="!isLogin && !showLogoutModal" class="nologin-page"> |
|
|
|
<view class="nologin-top-bg"> |
|
|
|
<view class="nologin-header"> |
|
|
|
<image class="nologin-avatar" src="https://cdn.uviewui.com/uview/album/1.jpg" mode="aspectFill" @click="toLogin" /> |
|
|
|
<view class="nologin-text" @click="toLogin">点击登录</view> |
|
|
|
</view> |
|
|
|
<view class="nologin-header-right"> |
|
|
|
<uv-icon name="more-dot-fill" size="40rpx" color="#bbb"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="nologin-content-center"> |
|
|
|
<button class="nologin-btn" @click="toLogin">立即登录</button> |
|
|
|
<view class="nologin-tip">暂未登录 请先登录</view> |
|
|
|
</view> |
|
|
|
<tabber select="center" /> |
|
|
|
</view> |
|
|
|
<view v-if="showLogoutModal" class="modal-mask"> |
|
|
|
<view class="modal-box"> |
|
|
|
<view class="modal-title">退出登录</view> |
|
|
|
<view class="modal-content">确认要退出登录吗</view> |
|
|
|
<view class="modal-actions"> |
|
|
|
<view class="modal-btn" @click="cancelLogout">取消</view> |
|
|
|
<view class="modal-btn confirm" @click="confirmLogout">确认</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import tabber from '@/components/base/tabbar.vue' |
|
|
|
import uvIcon from '@/uni_modules/uv-icon/components/uv-icon/uv-icon.vue' |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
tabber, |
|
|
|
uvIcon, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
showLogoutModal: false, |
|
|
|
isLogin: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -119,19 +150,17 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
logout() { |
|
|
|
// 退出登录逻辑 |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '确定要退出登录吗?', |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
// 执行退出登录 |
|
|
|
uni.showToast({ |
|
|
|
title: '已退出登录' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
this.showLogoutModal = true; |
|
|
|
}, |
|
|
|
cancelLogout() { |
|
|
|
this.showLogoutModal = false; |
|
|
|
}, |
|
|
|
confirmLogout() { |
|
|
|
this.showLogoutModal = false; |
|
|
|
this.isLogin = false; |
|
|
|
}, |
|
|
|
toLogin() { |
|
|
|
uni.showToast({ title: '跳转登录页', icon: 'none' }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -151,10 +180,9 @@ |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
padding: 30rpx 20rpx; |
|
|
|
background-color: #fff; |
|
|
|
background: linear-gradient(135deg, #e8e6fa 0%, #fbeff3 100%); |
|
|
|
border-radius: 20rpx; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
background: linear-gradient(to right, purple, pink); |
|
|
|
|
|
|
|
.avatar { |
|
|
|
width: 120rpx; |
|
|
@ -242,4 +270,122 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.nologin-page { |
|
|
|
min-height: 100vh; |
|
|
|
background: #fff; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: flex-start; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
.nologin-top-bg { |
|
|
|
width: 100vw; |
|
|
|
height: 220rpx; |
|
|
|
background: linear-gradient(180deg, #f3eafe 0%, #fff 100%); |
|
|
|
position: relative; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
align-items: flex-start; |
|
|
|
justify-content: flex-start; |
|
|
|
} |
|
|
|
.nologin-header { |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
align-items: center; |
|
|
|
margin-left: 36rpx; |
|
|
|
margin-top: 218rpx; |
|
|
|
|
|
|
|
} |
|
|
|
.nologin-avatar { |
|
|
|
width: 80rpx; |
|
|
|
height: 80rpx; |
|
|
|
border-radius: 50%; |
|
|
|
background: #eee; |
|
|
|
margin-right: 18rpx; |
|
|
|
} |
|
|
|
.nologin-text { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
.nologin-header-right { |
|
|
|
position: absolute; |
|
|
|
right: 36rpx; |
|
|
|
top: 48rpx; |
|
|
|
} |
|
|
|
.nologin-content-center { |
|
|
|
position: absolute; |
|
|
|
top: 50%; |
|
|
|
left: 0; |
|
|
|
width: 100vw; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
transform: translateY(-50%); |
|
|
|
z-index: 2; |
|
|
|
} |
|
|
|
.nologin-btn { |
|
|
|
width: 320rpx; |
|
|
|
height: 64rpx; |
|
|
|
background: #132a57; |
|
|
|
color: #fff; |
|
|
|
font-size: 28rpx; |
|
|
|
border-radius: 32rpx; |
|
|
|
margin-bottom: 18rpx; |
|
|
|
font-weight: bold; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
.nologin-tip { |
|
|
|
color: #bcbcbc; |
|
|
|
font-size: 24rpx; |
|
|
|
margin-top: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.modal-mask { |
|
|
|
position: fixed; |
|
|
|
left: 0; top: 0; right: 0; bottom: 0; |
|
|
|
background: rgba(0,0,0,0.5); |
|
|
|
z-index: 9999; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
.modal-box { |
|
|
|
background: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
width: 80vw; |
|
|
|
padding: 40rpx 0 0 0; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.modal-title { |
|
|
|
font-size: 32rpx; |
|
|
|
font-weight: bold; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
} |
|
|
|
.modal-content { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #333; |
|
|
|
margin-bottom: 30rpx; |
|
|
|
} |
|
|
|
.modal-actions { |
|
|
|
display: flex; |
|
|
|
border-top: 1px solid #eee; |
|
|
|
height: 90rpx; |
|
|
|
} |
|
|
|
.modal-btn { |
|
|
|
flex: 1; |
|
|
|
line-height: 90rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
color: #333; |
|
|
|
border-right: 1px solid #eee; |
|
|
|
} |
|
|
|
.modal-btn:last-child { |
|
|
|
border-right: none; |
|
|
|
color: #2a5ed6; |
|
|
|
} |
|
|
|
.modal-btn.confirm { |
|
|
|
color: #2a5ed6; |
|
|
|
} |
|
|
|
</style> |