userInfo.vue 4.6 KB

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