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

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