userInfo.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="work-panel_userinfo">
  3. <view class="userinfo-left">
  4. <view class="avatar">
  5. <image class="image" src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg" mode="widthFix"></image>
  6. <text class="title">{{ userInfoValue.rolenames }}</text>
  7. <text class="title2">{{ userInfoValue.rolenames }}</text>
  8. </view>
  9. <view class="info">
  10. <text class="title">{{ userInfoValue.name || userInfoValue.remarks }}</text>
  11. <text class="time">已加入{{ userInfoValue.joindays>30 ?`${Math.floor(userInfoValue.joindays/30)}个月`: `${userInfoValue.joindays}天` }}</text>
  12. </view>
  13. </view>
  14. <view class="userinfo-right">
  15. <navigator :url="isCode?'/cloud/businessCard/index':'/team/userCenter/personal'" class="info-card">
  16. <image class="image" src="/static/workbench/个人名片.svg" mode="widthFix"></image>
  17. <text class="title">{{isCode?'个人名片':'个人信息'}}</text>
  18. </navigator>
  19. <view class="info-card">
  20. <image class="image" src="/static/workbench/咨询消息.svg" mode="widthFix"></image>
  21. <text class="title">咨询消息</text>
  22. </view>
  23. <view class="info-card" v-if="isCode">
  24. <image class="image" src="/static/workbench/店铺码.svg" mode="widthFix"></image>
  25. <text class="title">店铺码</text>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. props:{
  33. isCode: {
  34. type:Boolean,
  35. default:() => true
  36. },
  37. userInfoValue: {
  38. type:Object,
  39. default:() => {}
  40. }
  41. },
  42. data () {
  43. return {
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. .work-panel_userinfo {
  50. margin: 20px 0 30px 0;
  51. display: flex;
  52. align-items: center;
  53. justify-content: space-between;
  54. .userinfo-left {
  55. display: flex;
  56. align-items: center;
  57. justify-content: space-between;
  58. .avatar {
  59. display: flex;
  60. flex-direction: column;
  61. align-items: center;
  62. position: relative;
  63. .image{
  64. width: 44px;
  65. height: 44px;
  66. box-shadow: #F7F7F7 0 5px;
  67. }
  68. .title{
  69. font-family: PingFang SC, PingFang SC;
  70. font-size: 10px;
  71. padding: 3px 6px;
  72. color: #FFFFFF;
  73. background: #1E2E41;
  74. border-radius: 50px 50px 50px 50px;
  75. border: 1px solid #F7F7F7;
  76. position: absolute;
  77. bottom: -5px;
  78. }
  79. .title2{
  80. font-family: PingFang SC, PingFang SC;
  81. font-size: 10px;
  82. padding: 3px 6px;
  83. border: 1px solid #F7F7F7;
  84. height: 0;
  85. opacity: 0;
  86. }
  87. }
  88. .info {
  89. display: flex;
  90. flex-direction: column;
  91. font-family: Source Han Sans SC, Source Han Sans SC;
  92. margin-left: 10px;
  93. .title{
  94. font-weight: 500;
  95. font-size: 18px;
  96. color: #333333;
  97. }
  98. .time{
  99. font-size: 12px;
  100. color: #999999;
  101. margin-top: 6px;
  102. }
  103. }
  104. }
  105. .userinfo-right {
  106. display: flex;
  107. align-items: center;
  108. font-family: Source Han Sans SC, Source Han Sans SC;
  109. .info-card {
  110. cursor: pointer;
  111. &:nth-child(1),&:nth-child(2) {
  112. margin-right: 23px;
  113. }
  114. display: flex;
  115. flex-direction: column;
  116. .image {
  117. width: 32px;
  118. height: 32px;
  119. align-self: center;
  120. }
  121. .title {
  122. font-size: 10px;
  123. color: #333333;
  124. margin-top: 4px;
  125. }
  126. }
  127. }
  128. }
  129. </style>