index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <view class="container">
  3. <!-- 头部信息 -->
  4. <view class="header">
  5. <image class="avatar" :src="avatarUrl" mode="aspectFill"></image>
  6. <view class="user-info">
  7. <text class="phone">{{ phone }}</text>
  8. <navigator class="personal-info" href="/pages/personalInfo">个人信息 ></navigator>
  9. </view>
  10. </view>
  11. <!-- 我的学习模块 -->
  12. <view class="my-study">
  13. <view class="section-title">我的学习</view>
  14. <view class="function-icons">
  15. <view class="icon-item" @click="goToCalendar">
  16. <image class="icon" :src="calendarIcon" mode="aspectFill"></image>
  17. <text class="icon-text">日历</text>
  18. </view>
  19. <view class="icon-item" @click="goToDownload">
  20. <image class="icon" :src="downloadIcon" mode="aspectFill"></image>
  21. <text class="icon-text">我的下载</text>
  22. </view>
  23. <view class="icon-item" @click="goToWrongBook">
  24. <image class="icon" :src="wrongBookIcon" mode="aspectFill"></image>
  25. <text class="icon-text">错题本</text>
  26. </view>
  27. <view class="icon-item" @click="goToSuperMember">
  28. <image class="icon" :src="superMemberIcon" mode="aspectFill"></image>
  29. <text class="icon-text">超级会员</text>
  30. </view>
  31. <view class="icon-item" @click="goToSubscribeStore">
  32. <image class="icon" :src="subscribeStoreIcon" mode="aspectFill"></image>
  33. <text class="icon-text">订阅店铺</text>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 其他功能列表 -->
  38. <view class="function-list">
  39. <navigator class="function-item" href="/pages/storeBackend">
  40. <image class="function-icon" :src="storeBackendIcon" mode="aspectFill"></image>
  41. <text class="function-text">商家店铺后台</text>
  42. </navigator>
  43. <navigator class="function-item" href="/pages/recycleBin">
  44. <image class="function-icon" :src="recycleBinIcon" mode="aspectFill"></image>
  45. <text class="function-text">回收站</text>
  46. </navigator>
  47. <navigator class="function-item" href="/pages/notificationSettings">
  48. <image class="function-icon" :src="notificationIcon" mode="aspectFill"></image>
  49. <text class="function-text">通知设置</text>
  50. </navigator>
  51. <navigator class="function-item" href="/pages/feedback">
  52. <image class="function-icon" :src="feedbackIcon" mode="aspectFill"></image>
  53. <text class="function-text">意见反馈</text>
  54. </navigator>
  55. <navigator class="function-item" href="/pages/onlineCustomerService">
  56. <image class="function-icon" :src="customerServiceIcon" mode="aspectFill"></image>
  57. <text class="function-text">在线客服</text>
  58. </navigator>
  59. <navigator class="function-item" href="/pages/knowXetong" @click="goToKnowXetong">
  60. <image class="function-icon" :src="knowXetongIcon" mode="aspectFill"></image>
  61. <text class="function-text" >了解小鹅通</text>
  62. </navigator>
  63. <navigator class="function-item" href="/pages/settings">
  64. <image class="function-icon" :src="settingsIcon" mode="aspectFill"></image>
  65. <text class="function-text">设置</text>
  66. </navigator>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. // 头像地址,需替换为真实路径
  75. avatarUrl: '/static/my/photo.png',
  76. phone: '19931034261',
  77. // 各图标地址,需替换为真实路径
  78. calendarIcon: '/static/my/rili.png',
  79. downloadIcon: '/static/my/wdxz.png',
  80. wrongBookIcon: '/static/my/ctb.png',
  81. superMemberIcon: '/static/my/svip.png',
  82. subscribeStoreIcon: '/static/my/shop.png',
  83. storeBackendIcon: '/static/my/gys.png',
  84. recycleBinIcon: '/static/my/hsz.png',
  85. notificationIcon: '/static/my/tz.png',
  86. feedbackIcon: '/static/my/yj.png',
  87. customerServiceIcon: '/static/my/kf.png',
  88. knowXetongIcon: '/static/logo.png',
  89. settingsIcon: '/static/my/sz.png',
  90. arrowIcon: '/static/my/o.png'
  91. };
  92. },
  93. methods: {
  94. goToCalendar() {
  95. uni.navigateTo({ url: '/pages/calendar' });
  96. },
  97. goToDownload() {
  98. uni.navigateTo({ url: '/pages/download' });
  99. },
  100. goToWrongBook() {
  101. uni.navigateTo({ url: '/pages/wrongBook' });
  102. },
  103. goToSuperMember() {
  104. uni.navigateTo({ url: '/pages/superMember' });
  105. },
  106. goToSubscribeStore() {
  107. uni.navigateTo({ url: '/pages/subscribeStore' });
  108. },
  109. goToKnowXetong() {
  110. uni.navigateTo({ url: '/pages/knowXetong/knowXetong' });
  111. }
  112. }
  113. };
  114. </script>
  115. <style>
  116. .container {
  117. background-color: #f5f7fa;
  118. padding: 20rpx;
  119. }
  120. .header {
  121. display: flex;
  122. align-items: center;
  123. margin-bottom: 20rpx;
  124. }
  125. .avatar {
  126. width: 80rpx;
  127. height: 80rpx;
  128. border-radius: 50%;
  129. margin-right: 20rpx;
  130. }
  131. .user-info {
  132. display: flex;
  133. flex-direction: column;
  134. }
  135. .phone {
  136. font-size: 32rpx;
  137. font-weight: bold;
  138. }
  139. .personal-info {
  140. font-size: 28rpx;
  141. color: #999;
  142. }
  143. .my-study {
  144. background-color: #fff;
  145. border-radius: 20rpx;
  146. padding: 30rpx;
  147. margin-bottom: 25rpx;
  148. }
  149. .section-title {
  150. font-size: 32rpx;
  151. font-weight: bold;
  152. margin-bottom: 10rpx;
  153. }
  154. .function-icons {
  155. display: flex;
  156. justify-content: space-between;
  157. }
  158. .icon-item {
  159. display: flex;
  160. flex-direction: column;
  161. align-items: center;
  162. }
  163. .icon {
  164. width: 60rpx;
  165. height: 60rpx;
  166. margin-bottom: 10rpx;
  167. }
  168. .icon-text {
  169. font-size: 28rpx;
  170. }
  171. .function-list {
  172. background-color: #fff;
  173. border-radius: 10rpx;
  174. padding: 30rpx;
  175. }
  176. .function-item {
  177. display: flex;
  178. align-items: left;
  179. /* justify-content: space-between; */
  180. padding: 25rpx 0;
  181. border-bottom: 1rpx solid #eee;
  182. text-align: left; /* 让子元素内文本靠左对齐 */
  183. }
  184. .function-icon {
  185. width: 40rpx;
  186. height: 40rpx;
  187. margin-right: 20rpx;
  188. }
  189. .function-text {
  190. text-align: left;
  191. font-size: 32rpx;
  192. }
  193. </style>