userInfo.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="work-panel_userinfo">
  3. <view class="userinfo-left">
  4. <view class="avatar">
  5. <view class="image">
  6. <image
  7. :src="userInfoValue.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202406011717209838416B6150695f.webp'"
  8. mode="aspectFill"></image>
  9. </view>
  10. <text class="title">{{ userInfoValue.rolenames }}</text>
  11. <text class="title2">{{ userInfoValue.rolenames }}</text>
  12. </view>
  13. <view class="info">
  14. <text class="title">{{ userInfoValue.name || userInfoValue.remarks }}</text>
  15. <text class="time">已加入{{ userInfoValue.joindays > 30 ? `${Math.floor(userInfoValue.joindays / 30)}个月` :
  16. `${userInfoValue.joindays}天` }}</text>
  17. </view>
  18. </view>
  19. <view class="userinfo-right">
  20. <navigator
  21. :url="isCode ? '/cloud/businessCard/index' : '/cloud/businessCard/edit?origin=my&id=' + userInfoValue.userid"
  22. class="info-card" @click="goEdit">
  23. <image class="image" src="/static/workbench/个人名片.svg" mode="widthFix"></image>
  24. <text class="title">{{ isCode ? '个人名片' : '个人信息' }}</text>
  25. </navigator>
  26. <contact>
  27. <view class="info-card" hover-class="navigator-hover">
  28. <image class="image" src="/static/workbench/咨询消息.svg" mode="widthFix"></image>
  29. <text class="title">咨询消息</text>
  30. </view>
  31. </contact>
  32. <navigator :url="'/store/storeQRCode/index?id=' + userInfoValue.userid" class="info-card" v-if="isCode">
  33. <image class="image" src="/static/workbench/店铺码.svg" mode="widthFix"></image>
  34. <text class="title">店铺码</text>
  35. </navigator>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import contact from "../../../components/contact"
  41. export default {
  42. components: { contact },
  43. props: {
  44. isCode: {
  45. type: Boolean,
  46. default: () => true
  47. },
  48. userInfoValue: {
  49. type: Object,
  50. default: () => { }
  51. }
  52. },
  53. data() {
  54. return {
  55. }
  56. },
  57. methods: {
  58. goEdit() {
  59. this.$Http.editUser = function (id) {
  60. this.$emit('upData', id)
  61. delete this.$Http.editUser
  62. }.bind(this)
  63. this.$emit('selfCardClick')
  64. },
  65. selfCardClick() {
  66. }
  67. },
  68. }
  69. </script>
  70. <style lang="scss">
  71. .work-panel_userinfo {
  72. margin: 20px 0 30px 0;
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. .userinfo-left {
  77. display: flex;
  78. align-items: center;
  79. justify-content: space-between;
  80. .avatar {
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. position: relative;
  85. .image {
  86. width: 44px;
  87. height: 44px;
  88. border: 2px solid #FFFFFF;
  89. border-radius: 50%;
  90. box-shadow: 0px 3px 6px 1px #E0D6D7;
  91. image {
  92. width: 100%;
  93. height: 100%;
  94. border-radius: 50%;
  95. }
  96. }
  97. .title {
  98. font-family: PingFang SC, PingFang SC;
  99. font-size: 10px;
  100. padding: 3px 6px;
  101. color: #FFFFFF;
  102. background: #1E2E41;
  103. border-radius: 50px 50px 50px 50px;
  104. border: 1px solid #F7F7F7;
  105. position: absolute;
  106. bottom: -5px;
  107. }
  108. .title2 {
  109. font-family: PingFang SC, PingFang SC;
  110. font-size: 10px;
  111. padding: 3px 6px;
  112. border: 1px solid #F7F7F7;
  113. height: 0;
  114. opacity: 0;
  115. }
  116. }
  117. .info {
  118. display: flex;
  119. flex-direction: column;
  120. font-family: Source Han Sans SC, Source Han Sans SC;
  121. margin-left: 10px;
  122. .title {
  123. font-weight: 500;
  124. font-size: 18px;
  125. color: #333333;
  126. }
  127. .time {
  128. font-size: 12px;
  129. color: #999999;
  130. margin-top: 6px;
  131. }
  132. }
  133. }
  134. .userinfo-right {
  135. display: flex;
  136. align-items: center;
  137. font-family: Source Han Sans SC, Source Han Sans SC;
  138. .info-card {
  139. cursor: pointer;
  140. border-radius: 5px;
  141. box-sizing: border-box;
  142. padding: 5px;
  143. position: relative;
  144. display: flex;
  145. flex-direction: column;
  146. &:nth-child(1),
  147. &:nth-child(2) {
  148. margin-right: 5px;
  149. }
  150. &::after {
  151. content: '';
  152. width: 5px;
  153. height: 5px;
  154. border-radius: 50%;
  155. position: absolute;
  156. left: 50%;
  157. top: 50%;
  158. box-shadow: 5px 0px 20px 10px rgb(221, 221, 221);
  159. z-index: -1;
  160. }
  161. .image {
  162. width: 32px;
  163. height: 32px;
  164. align-self: center;
  165. }
  166. .title {
  167. font-size: 10px;
  168. color: #333333;
  169. margin-top: 4px;
  170. }
  171. }
  172. }
  173. }
  174. </style>