userInfo.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. this.$emit('selfCardClick')
  59. },
  60. selfCardClick () {
  61. }
  62. },
  63. }
  64. </script>
  65. <style lang="scss">
  66. .work-panel_userinfo {
  67. margin: 20px 0 30px 0;
  68. display: flex;
  69. align-items: center;
  70. justify-content: space-between;
  71. .userinfo-left {
  72. display: flex;
  73. align-items: center;
  74. justify-content: space-between;
  75. .avatar {
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. position: relative;
  80. .image{
  81. width: 44px;
  82. height: 44px;
  83. border: 2px solid #FFFFFF;
  84. border-radius: 50%;
  85. box-shadow: 0px 3px 6px 1px #E0D6D7;
  86. image {
  87. width: 100%;
  88. height: 100%;
  89. border-radius: 50%;
  90. }
  91. }
  92. .title{
  93. font-family: PingFang SC, PingFang SC;
  94. font-size: 10px;
  95. padding: 3px 6px;
  96. color: #FFFFFF;
  97. background: #1E2E41;
  98. border-radius: 50px 50px 50px 50px;
  99. border: 1px solid #F7F7F7;
  100. position: absolute;
  101. bottom: -5px;
  102. }
  103. .title2{
  104. font-family: PingFang SC, PingFang SC;
  105. font-size: 10px;
  106. padding: 3px 6px;
  107. border: 1px solid #F7F7F7;
  108. height: 0;
  109. opacity: 0;
  110. }
  111. }
  112. .info {
  113. display: flex;
  114. flex-direction: column;
  115. font-family: Source Han Sans SC, Source Han Sans SC;
  116. margin-left: 10px;
  117. .title{
  118. font-weight: 500;
  119. font-size: 18px;
  120. color: #333333;
  121. }
  122. .time{
  123. font-size: 12px;
  124. color: #999999;
  125. margin-top: 6px;
  126. }
  127. }
  128. }
  129. .userinfo-right {
  130. display: flex;
  131. align-items: center;
  132. font-family: Source Han Sans SC, Source Han Sans SC;
  133. .info-card {
  134. cursor: pointer;
  135. border-radius: 5px;
  136. box-sizing: border-box;
  137. padding: 5px;
  138. &:nth-child(1),&:nth-child(2) {
  139. margin-right: 5px;
  140. }
  141. display: flex;
  142. flex-direction: column;
  143. .image {
  144. width: 32px;
  145. height: 32px;
  146. align-self: center;
  147. }
  148. .title {
  149. font-size: 10px;
  150. color: #333333;
  151. margin-top: 4px;
  152. }
  153. }
  154. }
  155. }
  156. </style>