艺易修小程序24.08.21
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.

166 lines
2.8 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view class="">
  3. <uni-nav-bar dark :fixed="true" background-color="#00aaff" :border="false" status-bar title="个人中心" />
  4. <view class="content">
  5. <view class="topBox">
  6. <view class="users">
  7. <view class="u-top" v-if="userInfo.appletOpenid">
  8. <image class="img" :src="userInfo.headImage" mode="widthFix"></image>
  9. <view class="tit">
  10. {{ userInfo.nickName }}
  11. </view>
  12. </view>
  13. <view class="u-top" v-else>
  14. <image class="img"
  15. src="https://img2.baidu.com/it/u=2953585264,744730101&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360"
  16. mode="widthFix"></image>
  17. <view class="tit">
  18. 登录 / 注册
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="lists">
  24. <uni-list>
  25. <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" showArrow title="我的报修" clickable
  26. @click="clickList" />
  27. </uni-list>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. mapState,
  35. } from 'vuex'
  36. export default {
  37. name: 'Center',
  38. computed: {
  39. ...mapState(['userInfo']),
  40. },
  41. data() {
  42. return {
  43. queryParams: {
  44. pageNo: 1,
  45. pageSize: 10
  46. },
  47. orderList: [],
  48. extraIcon1: {
  49. color: '#666666',
  50. size: '22',
  51. type: 'auth'
  52. }
  53. }
  54. },
  55. onShow() {
  56. if (uni.getStorageSync('token')) {
  57. this.$store.commit('getUserInfo')
  58. }
  59. },
  60. methods: {
  61. clickList() {
  62. uni.navigateTo({
  63. url: '/pages/repairList/repairList'
  64. })
  65. }
  66. }
  67. }
  68. </script>
  69. <style scoped>
  70. .content {
  71. background: #F1F5F8;
  72. min-height: 100vh;
  73. }
  74. /* 弧形背景 */
  75. .topBox {
  76. width: 100%;
  77. position: relative;
  78. z-index: 1;
  79. overflow: hidden;
  80. padding: 60rpx 20rpx 20rpx;
  81. box-sizing: border-box;
  82. }
  83. .topBox::after {
  84. content: "";
  85. width: 140%;
  86. height: 100px;
  87. position: absolute;
  88. left: -20%;
  89. top: 0;
  90. z-index: -1;
  91. border-radius: 0 0 30% 50%;
  92. /* background: #00aaff; */
  93. }
  94. .txt {
  95. color: #fff;
  96. font-size: 30rpx;
  97. }
  98. .set-right .uni-icons {
  99. margin-right: 10rpx;
  100. }
  101. .users {
  102. display: flex;
  103. align-items: center;
  104. margin-top: 0rpx;
  105. padding: 0rpx 30rpx;
  106. box-sizing: border-box;
  107. height: 200rpx;
  108. background-color: #fff;
  109. box-shadow: 1px 10rpx 20rpx #ececec;
  110. border-radius: 12rpx;
  111. }
  112. .u-top {
  113. display: flex;
  114. justify-content: flex-start;
  115. align-items: center;
  116. }
  117. .users .u-top .img {
  118. width: 130rpx;
  119. height: 130rpx;
  120. border-radius: 50%;
  121. margin-right: 20rpx;
  122. }
  123. .u-top .tit {
  124. font-size: 30rpx;
  125. font-weight: 700;
  126. color: #333;
  127. }
  128. .u-item {
  129. text-align: center;
  130. }
  131. .u-item .u-tit {
  132. color: #757575;
  133. font-size: 26rpx;
  134. margin-top: 10rpx;
  135. }
  136. .u-item .num {
  137. color: #000000;
  138. font-size: 33rpx;
  139. font-weight: 700;
  140. }
  141. .bottomBox {
  142. padding: 20rpx;
  143. box-sizing: border-box;
  144. }
  145. .listBox {
  146. margin: -10rpx auto 0;
  147. padding: 20rpx;
  148. box-sizing: border-box;
  149. border-radius: 20rpx;
  150. }
  151. </style>