普兆健康管家前端代码仓库
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.

227 lines
5.1 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 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__view">
  3. <image class="bg" src="@/pages_order/static/center/bg.png" mode="widthFix"></image>
  4. <view class="main">
  5. <navbar bgColor="transparent" >
  6. <image class="nav-icon" src="@/pages_order/static/center/icon-nav.png" mode="widthFix"></image>
  7. </navbar>
  8. <view class="content">
  9. <view class="flex user">
  10. <view class="user-avatar">
  11. <image class="user-avatar-img" src="@/pages_order/static/report/avatar.png" mode="scaleToFill"></image>
  12. </view>
  13. <view class="user-info">
  14. <view class="user-info-name">战斗世界</view>
  15. <view class="user-info-desc">世界这么美身体要健康</view>
  16. </view>
  17. </view>
  18. <report-card></report-card>
  19. <order-card></order-card>
  20. <account-card></account-card>
  21. <view class="card">
  22. <view v-for="item in list1" :key="item.id">
  23. <!-- todo: key -> custom -->
  24. <view class="flex row" @click="onClick(item)">
  25. <view class="flex label">
  26. <image class="icon" :src="item.icon" mode="scaleToFill"></image>
  27. <view>{{ item.label }}</view>
  28. </view>
  29. <uv-icon name="arrow-right" color="#C6C6C6" size="24rpx"></uv-icon>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="card">
  34. <view v-for="item in list2" :key="item.id">
  35. <view class="flex row" @click="onClick(item)">
  36. <view class="flex label">
  37. <image class="icon" :src="item.icon" mode="scaleToFill"></image>
  38. <view>{{ item.label }}</view>
  39. </view>
  40. <uv-icon name="arrow-right" color="#C6C6C6" size="24rpx"></uv-icon>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <tabber select="center" />
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import { mapState } from 'vuex'
  51. import tabber from '@/components/base/tabbar.vue'
  52. import reportCard from '@/pages_order/center/reportCard.vue'
  53. import orderCard from '@/pages_order/center/orderCard.vue'
  54. import accountCard from '@/pages_order/center/accountCard.vue'
  55. export default {
  56. components: {
  57. reportCard,
  58. orderCard,
  59. accountCard,
  60. tabber,
  61. },
  62. data() {
  63. return {
  64. list1: [
  65. { id: '001', label: '检测预约', icon: '/pages_order/static/center/icon-detectBook.png', path: '/pages_order/checkup/checkupRecords' },
  66. // todo
  67. { id: '002', label: '联系客服', icon: '/pages_order/static/center/icon-service.png', key: 'service' },
  68. // todo
  69. { id: '003', label: '服用说明', icon: '/pages_order/static/center/icon-instruc.png', path: '/pages_order/mine/instruc' },
  70. // todo
  71. { id: '004', label: '用户须知', icon: '/pages_order/static/center/icon-userAgreement.png', path: '/pages_order/mine/userAgreement' },
  72. ],
  73. list2: [
  74. { id: '005', label: '我的评价', icon: '/pages_order/static/center/icon-comment.png', key: 'comment' },
  75. // todo
  76. { id: '006', label: '关于我们', icon: '/pages_order/static/center/icon-aboutUs.png', path: '/pages_order/mine/service' },
  77. // todo
  78. { id: '007', label: '修改信息', icon: '/pages_order/static/center/icon-modifyInfo.png', path: '/pages_order/mine/instruc' },
  79. { id: '008', label: '退出登录', icon: '/pages_order/static/center/icon-logout.png', key: 'logout' },
  80. ],
  81. }
  82. },
  83. computed: {
  84. ...mapState(['userInfo']),
  85. },
  86. methods: {
  87. onClick(target) {
  88. const { key, path } = target
  89. switch(key) {
  90. case 'comment':
  91. this.$utils.navigateTo(`/pages_order/comment/commentRecords?creator=${this.userInfo.id}`)
  92. break
  93. case 'logout':
  94. this.$store.commit('logout')
  95. break
  96. default:
  97. path && this.$utils.navigateTo(path)
  98. break
  99. }
  100. },
  101. },
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. .page__view {
  106. width: 100vw;
  107. min-height: 100vh;
  108. background-color: $uni-bg-color;
  109. position: relative;
  110. /deep/ .nav-bar__view {
  111. position: fixed;
  112. top: 0;
  113. left: 0;
  114. }
  115. .nav-icon {
  116. width: 200rpx;
  117. height: auto;
  118. vertical-align: top;
  119. }
  120. }
  121. .bg {
  122. width: 100vw;
  123. height: auto;
  124. }
  125. .main {
  126. position: absolute;
  127. top: 176rpx;
  128. left: 0;
  129. width: 100%;
  130. }
  131. .content {
  132. width: 100%;
  133. padding: 16rpx 32rpx 80rpx 32rpx;
  134. box-sizing: border-box;
  135. }
  136. .user {
  137. column-gap: 24rpx;
  138. &-avatar {
  139. flex: none;
  140. width: 100rpx;
  141. height: 100rpx;
  142. border: 4rpx solid #FFFFFF;
  143. border-radius: 50%;
  144. overflow: hidden;
  145. &-img {
  146. width: 100%;
  147. height: 100%;
  148. }
  149. }
  150. &-info {
  151. flex: 1;
  152. &-name {
  153. font-family: PingFang SC;
  154. font-weight: 600;
  155. font-size: 36rpx;
  156. line-height: 1.2;
  157. color: #FFFFFF;
  158. }
  159. &-desc {
  160. margin-top: 8rpx;
  161. font-family: PingFang SC;
  162. font-weight: 400;
  163. font-size: 24rpx;
  164. line-height: 1.5;
  165. color: #F4F4F4;
  166. }
  167. }
  168. }
  169. .card {
  170. margin-top: 32rpx;
  171. width: 100%;
  172. background: #FAFAFF;
  173. border: 2rpx solid #FFFFFF;
  174. border-radius: 32rpx;
  175. box-sizing: border-box;
  176. .row {
  177. justify-content: space-between;
  178. width: 100%;
  179. padding: 40rpx;
  180. box-sizing: border-box;
  181. .label {
  182. font-family: PingFang SC;
  183. font-weight: 400;
  184. font-size: 28rpx;
  185. line-height: 1;
  186. color: #252545;
  187. .icon {
  188. margin-right: 16rpx;
  189. width: 40rpx;
  190. height: 40rpx;
  191. }
  192. }
  193. }
  194. }
  195. </style>