userInfo.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 u-line-2">{{ 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. .userinfo-left {
  76. display: flex;
  77. align-items: center;
  78. flex: 1;
  79. .avatar {
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. position: relative;
  84. .image {
  85. width: 44px;
  86. height: 44px;
  87. border: 2px solid #FFFFFF;
  88. border-radius: 50%;
  89. box-shadow: 0px 3px 6px 1px #E0D6D7;
  90. image {
  91. width: 100%;
  92. height: 100%;
  93. border-radius: 50%;
  94. }
  95. }
  96. .title {
  97. font-family: PingFang SC, PingFang SC;
  98. font-size: 10px;
  99. padding: 3px 6px;
  100. color: #FFFFFF;
  101. background: #1E2E41;
  102. border-radius: 50px 50px 50px 50px;
  103. border: 1px solid #F7F7F7;
  104. position: absolute;
  105. bottom: -5px;
  106. }
  107. .title2 {
  108. font-family: PingFang SC, PingFang SC;
  109. font-size: 10px;
  110. padding: 3px 6px;
  111. border: 1px solid #F7F7F7;
  112. height: 0;
  113. opacity: 0;
  114. }
  115. }
  116. .info {
  117. display: flex;
  118. flex-direction: column;
  119. font-family: Source Han Sans SC, Source Han Sans SC;
  120. margin-left: 10px;
  121. .title {
  122. font-weight: 500;
  123. font-size: 18px;
  124. color: #333333;
  125. }
  126. .time {
  127. font-size: 12px;
  128. color: #999999;
  129. margin-top: 6px;
  130. }
  131. }
  132. }
  133. .userinfo-right {
  134. display: flex;
  135. align-items: center;
  136. font-family: Source Han Sans SC, Source Han Sans SC;
  137. .info-card {
  138. cursor: pointer;
  139. border-radius: 5px;
  140. box-sizing: border-box;
  141. padding: 5px;
  142. position: relative;
  143. display: flex;
  144. flex-direction: column;
  145. &:nth-child(1),
  146. &:nth-child(2) {
  147. margin-right: 5px;
  148. }
  149. &::after {
  150. content: '';
  151. width: 5px;
  152. height: 5px;
  153. border-radius: 50%;
  154. position: absolute;
  155. left: 50%;
  156. top: 50%;
  157. box-shadow: 5px 0px 20px 10px rgb(221, 221, 221);
  158. z-index: -1;
  159. }
  160. .image {
  161. width: 32px;
  162. height: 32px;
  163. align-self: center;
  164. }
  165. .title {
  166. font-size: 10px;
  167. color: #333333;
  168. margin-top: 4px;
  169. }
  170. }
  171. }
  172. }
  173. </style>