people.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view>
  3. <scroll-view scroll-y class="page">
  4. <!-- 头部logo-->
  5. <view class="UCenter-bg" @click="remove">
  6. <image :src="personalList.avatar" round class="png animation-slide-right margin-bottom-sm" mode="widthFix" :style="[{animationDelay: '0.1s'}]"></image>
  7. <view class="text-xl animation-slide-left" :style="[{animationDelay: '0.2s'}]">
  8. {{personalList.depart}}
  9. </view>
  10. <image src="/static/wave.gif" mode="scaleToFill" class="gif-wave"></image>
  11. </view>
  12. <!-- 个人信息卡片-->
  13. <!-- <view class="cu-list menu-avatar">
  14. <view class="cu-item">
  15. <view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
  16. <view class="content flex-sub">
  17. <view class="text-grey">{{personalList.avatar}}</view>
  18. <view class="text-gray text-sm flex justify-between">
  19. 经理
  20. </view>
  21. </view>
  22. </view>
  23. </view> -->
  24. <view class="padding flex text-center text-grey bg-white shadow-warp">
  25. <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
  26. <view class="text-xl text-orange">{{personalList.username}}</view>
  27. <view class="margin-top-sm"><text class="cuIcon-people"></text> 用户</view>
  28. </view>
  29. <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]">
  30. <view class="text-xl text-green">{{personalList.post?personalList.post:'员工'}}</view>
  31. <view class="margin-top-sm"><text class="cuIcon-news"></text> 职务</view>
  32. </view>
  33. </view>
  34. <!-- 列表list-->
  35. <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
  36. <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]">
  37. <view class="content" >
  38. <text class="cuIcon-favorfill text-yellow"></text>
  39. <text class="text-grey">收藏</text>
  40. </view>
  41. </view>
  42. <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.3s'}]">
  43. <view class="content">
  44. <text class="cuIcon-redpacket_fill text-red"></text>
  45. <text class="text-grey">红包</text>
  46. </view>
  47. </view>
  48. <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.5s'}]">
  49. <navigator class="content" url="/pages/user/userdetail" hover-class="none">
  50. <text class="cuIcon-settingsfill text-cyan"></text>
  51. <text class="text-grey">设置</text>
  52. </navigator>
  53. </view>
  54. <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]">
  55. <navigator class="content" url="/pages/user/userexit" hover-class="none">
  56. <text class="cuIcon-exit text-cyan"></text>
  57. <text class="text-grey">退出</text>
  58. </navigator>
  59. </view>
  60. </view>
  61. <view class="cu-tabbar-height"></view>
  62. </scroll-view>
  63. </view>
  64. </template>
  65. <script>
  66. import api from '@/api/api'
  67. export default {
  68. name: "people",
  69. data() {
  70. return {
  71. personalList:{
  72. avatar:'',
  73. realname:'',
  74. username:'',
  75. post:''
  76. },
  77. positionUrl:'/sys/position/list',
  78. departUrl:'/sys/user/userDepartList',
  79. userUrl:'/sys/user/queryById',
  80. userId:'',
  81. id:''
  82. };
  83. },
  84. watch: {
  85. cur: {
  86. immediate: true,
  87. handler() {
  88. console.log('watch',this.cur)
  89. this.load()
  90. },
  91. },
  92. },
  93. methods: {
  94. remove(){
  95. uni.removeStorageSync('Access-Token')
  96. },
  97. load(){
  98. this.$http.get(this.userUrl,{params:{id:this.$store.getters.userid}}).then(res=>{
  99. console.log("res",res)
  100. if (res.data.success) {
  101. let perArr = res.data.result
  102. let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png'
  103. this.personalList.avatar =avatar
  104. this.personalList.realname = perArr.realname
  105. this.personalList.username = perArr.username
  106. this.personalList.post = perArr.post
  107. this.personalList.depart = perArr.departIds
  108. }
  109. }).catch(err => {
  110. console.log(err);
  111. });
  112. }
  113. }
  114. }
  115. </script>
  116. <style>
  117. .UCenter-bg {
  118. background-image: url(https://image.weilanwl.com/color2.0/index.jpg);
  119. background-size: cover;
  120. height: 400rpx;
  121. display: flex;
  122. justify-content: center;
  123. padding-top: 40rpx;
  124. overflow: hidden;
  125. position: relative;
  126. flex-direction: column;
  127. align-items: center;
  128. color: #fff;
  129. font-weight: 300;
  130. text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  131. }
  132. .UCenter-bg text {
  133. opacity: 0.8;
  134. }
  135. .UCenter-bg image {
  136. width: 200rpx;
  137. height: 200rpx;
  138. }
  139. .UCenter-bg .gif-wave{
  140. position: absolute;
  141. width: 100%;
  142. bottom: 0;
  143. left: 0;
  144. z-index: 99;
  145. mix-blend-mode: screen;
  146. height: 100rpx;
  147. }
  148. map,.mapBox{
  149. left: 0;
  150. z-index: 99;
  151. mix-blend-mode: screen;
  152. height: 100rpx;
  153. }
  154. map,.mapBox{
  155. width: 750rpx;
  156. height: 300rpx;
  157. }
  158. </style>