userInfo.vue 4.7 KB

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