小说小程序前端代码仓库(小程序)
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.

241 lines
5.6 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month 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="navigateTo('/pages/wallet')">
  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="navigateTo('/pages/gift')">
  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="navigateTo('/pages/comments')">
  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="navigateTo('/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="navigateTo('/pages/author')">
  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="navigateTo('/pages/customer-service')">
  71. <view class="section-item-left">
  72. <text>联系客服</text>
  73. </view>
  74. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  75. </view>
  76. <view class="section-item" @click="navigateTo('/pages/edit-info')">
  77. <view class="section-item-left">
  78. <uv-icon name="edit-pen" size="40rpx" color="#333"></uv-icon>
  79. <text>修改信息</text>
  80. </view>
  81. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  82. </view>
  83. <view class="section-item" @click="logout">
  84. <view class="section-item-left">
  85. <text>退出登录</text>
  86. </view>
  87. <uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <tabber select="cart" />
  93. </view>
  94. </template>
  95. <script>
  96. import tabber from '@/components/base/tabbar.vue'
  97. export default {
  98. components: {
  99. tabber,
  100. },
  101. data() {
  102. return {
  103. }
  104. },
  105. methods: {
  106. navigateToPage(url) {
  107. uni.navigateTo({
  108. url
  109. })
  110. },
  111. logout() {
  112. // 退出登录逻辑
  113. uni.showModal({
  114. title: '提示',
  115. content: '确定要退出登录吗?',
  116. success: (res) => {
  117. if (res.confirm) {
  118. // 执行退出登录
  119. uni.showToast({
  120. title: '已退出登录'
  121. })
  122. }
  123. }
  124. })
  125. }
  126. }
  127. }
  128. </script>
  129. <style scoped lang="scss">
  130. .page {
  131. padding-bottom: 200rpx;
  132. background-color: #f5f5f5;
  133. }
  134. .user {
  135. padding: 20rpx 30rpx;
  136. .user-info {
  137. display: flex;
  138. align-items: center;
  139. padding: 30rpx 20rpx;
  140. background-color: #fff;
  141. border-radius: 20rpx;
  142. margin-bottom: 20rpx;
  143. .avatar {
  144. width: 120rpx;
  145. height: 120rpx;
  146. border-radius: 50%;
  147. margin-right: 20rpx;
  148. }
  149. .info {
  150. flex: 1;
  151. .name {
  152. font-size: 32rpx;
  153. font-weight: bold;
  154. margin-bottom: 10rpx;
  155. .id {
  156. font-size: 24rpx;
  157. font-weight: normal;
  158. color: #999;
  159. }
  160. }
  161. .desc {
  162. font-size: 26rpx;
  163. color: #666;
  164. margin-bottom: 10rpx;
  165. }
  166. .phone {
  167. font-size: 26rpx;
  168. color: #666;
  169. }
  170. }
  171. .more {
  172. padding: 10rpx;
  173. }
  174. }
  175. .section {
  176. margin-bottom: 20rpx;
  177. .section-title {
  178. font-size: 28rpx;
  179. color: #999;
  180. padding: 20rpx 10rpx 10rpx;
  181. }
  182. .section-list {
  183. background-color: #fff;
  184. border-radius: 20rpx;
  185. overflow: hidden;
  186. .section-item {
  187. display: flex;
  188. align-items: center;
  189. justify-content: space-between;
  190. padding: 30rpx 20rpx;
  191. border-bottom: 1px solid #f5f5f5;
  192. &:last-child {
  193. border-bottom: none;
  194. }
  195. .section-item-left {
  196. display: flex;
  197. align-items: center;
  198. text {
  199. margin-left: 20rpx;
  200. font-size: 28rpx;
  201. }
  202. }
  203. .badge {
  204. background-color: #FA5A0A;
  205. color: #fff;
  206. font-size: 22rpx;
  207. padding: 2rpx 12rpx;
  208. border-radius: 20rpx;
  209. margin-right: 10rpx;
  210. }
  211. }
  212. }
  213. }
  214. }
  215. </style>