小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

244 lines
5.9 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="page">
  3. <navbar/>
  4. <view class="user">
  5. <!-- 用户信息区域 -->
  6. <view class="user-info">
  7. <image class="avatar" src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image>
  8. <view class="info">
  9. <view class="name">战斗世界 <text class="id">(ID: 50523541)</text></view>
  10. <view class="desc">世界达人小说控</view>
  11. <view class="phone">手机号19898474531</view>
  12. </view>
  13. <view class="more">
  14. <uv-icon name="more-dot-fill" size="46rpx" color="#999"></uv-icon>
  15. </view>
  16. </view>
  17. <!-- 图片区域 -->
  18. <view class="section">
  19. <view class="section-title">账户</view>
  20. <view class="section-list">
  21. <view class="section-item" @click="navigateToPage('/pages_order/novel/Walletflow')">
  22. <view class="section-item-left">
  23. <uv-icon name="photo" size="40rpx" color="#333"></uv-icon>
  24. <text>钱包流水</text>
  25. </view>
  26. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  27. </view>
  28. <view class="section-item" @click="navigateToPage('/pages_order/novel/Giftbox')">
  29. <view class="section-item-left">
  30. <uv-icon name="gift" size="40rpx" color="#333"></uv-icon>
  31. <text>礼物盒</text>
  32. </view>
  33. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 日常区域 -->
  38. <view class="section">
  39. <view class="section-title">日常</view>
  40. <view class="section-list">
  41. <view class="section-item" @click="navigateToPage('/pages_order/novel/Mycomment')">
  42. <view class="section-item-left">
  43. <uv-icon name="chat" size="40rpx" color="#333"></uv-icon>
  44. <text>我的评论</text>
  45. </view>
  46. <view class="badge">294</view>
  47. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  48. </view>
  49. <view class="section-item" @click="navigateToPage('/pages/tasks')">
  50. <view class="section-item-left">
  51. <uv-icon name="list" size="40rpx" color="#333"></uv-icon>
  52. <text>任务中心</text>
  53. </view>
  54. <view class="badge">5</view>
  55. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 设置区域 -->
  60. <view class="section">
  61. <view class="section-title">设置</view>
  62. <view class="section-list">
  63. <view class="section-item" @click="navigateToPage('/pages_order/novel/creator')">
  64. <view class="section-item-left">
  65. <uv-icon name="star" size="40rpx" color="#333"></uv-icon>
  66. <text>申请成为作者</text>
  67. </view>
  68. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  69. </view>
  70. <view class="section-item" @click="navigateToPage('/pages/customer-service')">
  71. <view class="section-item-left">
  72. <uv-icon name="star" size="40rpx" color="#333"></uv-icon>
  73. <text>联系客服</text>
  74. </view>
  75. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  76. </view>
  77. <view class="section-item" @click="navigateToPage('/pages/edit-info')">
  78. <view class="section-item-left">
  79. <uv-icon name="edit-pen" size="40rpx" color="#333"></uv-icon>
  80. <text>修改信息</text>
  81. </view>
  82. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  83. </view>
  84. <view class="section-item" @click="logout">
  85. <view class="section-item-left">
  86. <uv-icon name="star" size="40rpx" color="#333"></uv-icon>
  87. <text>退出登录</text>
  88. </view>
  89. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <tabber select="center" />
  95. </view>
  96. </template>
  97. <script>
  98. import tabber from '@/components/base/tabbar.vue'
  99. export default {
  100. components: {
  101. tabber,
  102. },
  103. data() {
  104. return {
  105. }
  106. },
  107. methods: {
  108. navigateToPage(url) {
  109. uni.navigateTo({
  110. url
  111. })
  112. },
  113. logout() {
  114. // 退出登录逻辑
  115. uni.showModal({
  116. title: '提示',
  117. content: '确定要退出登录吗?',
  118. success: (res) => {
  119. if (res.confirm) {
  120. // 执行退出登录
  121. uni.showToast({
  122. title: '已退出登录'
  123. })
  124. }
  125. }
  126. })
  127. }
  128. }
  129. }
  130. </script>
  131. <style scoped lang="scss">
  132. .page {
  133. padding-bottom: 200rpx;
  134. background-color: #f5f5f5;
  135. }
  136. .user {
  137. padding: 20rpx 30rpx;
  138. .user-info {
  139. height: 270rpx;
  140. display: flex;
  141. align-items: center;
  142. padding: 30rpx 20rpx;
  143. background-color: #fff;
  144. border-radius: 20rpx;
  145. margin-bottom: 20rpx;
  146. background: linear-gradient(to right, purple, pink);
  147. .avatar {
  148. width: 120rpx;
  149. height: 120rpx;
  150. border-radius: 50%;
  151. margin-right: 20rpx;
  152. }
  153. .info {
  154. flex: 1;
  155. .name {
  156. font-size: 32rpx;
  157. font-weight: bold;
  158. margin-bottom: 10rpx;
  159. .id {
  160. font-size: 24rpx;
  161. font-weight: normal;
  162. color: #999;
  163. }
  164. }
  165. .desc {
  166. font-size: 26rpx;
  167. color: #666;
  168. margin-bottom: 10rpx;
  169. }
  170. .phone {
  171. font-size: 26rpx;
  172. color: #666;
  173. }
  174. }
  175. .more {
  176. padding: 10rpx;
  177. }
  178. }
  179. .section {
  180. margin-bottom: 20rpx;
  181. .section-title {
  182. font-size: 28rpx;
  183. color: #999;
  184. padding: 20rpx 10rpx 10rpx;
  185. }
  186. .section-list {
  187. background-color: #fff;
  188. border-radius: 20rpx;
  189. overflow: hidden;
  190. .section-item {
  191. display: flex;
  192. align-items: center;
  193. justify-content: space-between;
  194. padding: 30rpx 20rpx;
  195. border-bottom: 1px solid #f5f5f5;
  196. &:last-child {
  197. border-bottom: none;
  198. }
  199. .section-item-left {
  200. display: flex;
  201. align-items: center;
  202. text {
  203. margin-left: 20rpx;
  204. font-size: 28rpx;
  205. }
  206. }
  207. .badge {
  208. background-color: #FA5A0A;
  209. color: #fff;
  210. font-size: 22rpx;
  211. padding: 2rpx 12rpx;
  212. border-radius: 20rpx;
  213. margin-right: 10rpx;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. </style>