personalPage.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <template>
  2. <view>
  3. <view class="header">
  4. <!-- 导航 -->
  5. <view :class="flag?'sticky':'navbar'">
  6. <view class="back">
  7. <u-icon name="arrow-left" size="40"></u-icon>
  8. </view>
  9. <view class="title">
  10. 个人主页
  11. </view>
  12. <view class="camera">
  13. <u-icon name="camera-fill" size="48"></u-icon>
  14. </view>
  15. </view>
  16. <!-- 个人信息 -->
  17. <view class="person-infos">
  18. <view class="photo">
  19. <img src="../../assets/img/shareP.png" alt="">
  20. </view>
  21. <view class="infos">
  22. <view class="name">
  23. 王泽
  24. </view>
  25. <view class="department-position">
  26. <view class="department">
  27. <view class="icon">
  28. <img src="../../assets/img/department2.png" alt="">
  29. </view>
  30. <view class="text">
  31. 采购部
  32. </view>
  33. </view>
  34. <view class="position">
  35. <text class="icon">
  36. <img src="../../assets/img/position2.png" alt="">
  37. </text>
  38. <text class="text">
  39. 员工
  40. </text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="grid">
  46. <view class="item">
  47. <view class="amout">
  48. 999
  49. </view>
  50. <view class="text">
  51. 发布
  52. </view>
  53. </view>
  54. <view class="item">
  55. <view class="amout">
  56. 999
  57. </view>
  58. <view class="text">
  59. 点赞
  60. </view>
  61. </view>
  62. <view class="item">
  63. <view class="amout">
  64. 999
  65. </view>
  66. <view class="text">
  67. 评论
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 分享 -->
  73. <view class="share">
  74. <view class="item">
  75. <view class="date">
  76. <view class="day">
  77. 15
  78. </view>
  79. <view class="year-month">
  80. 2023.1
  81. </view>
  82. </view>
  83. <view class="content">
  84. <view class="title">
  85. 周末去参加了公司组织的羽毛球赛~
  86. </view>
  87. <view class="photos">
  88. <img src="../../assets/img/sharePic2.png" alt="">
  89. <img src="../../assets/img/sharePic3.png" alt="">
  90. </view>
  91. </view>
  92. </view>
  93. <view class="item">
  94. <view class="date">
  95. <view class="day">
  96. 15
  97. </view>
  98. <view class="year-month">
  99. 2023.1
  100. </view>
  101. </view>
  102. <view class="content">
  103. <view class="title">
  104. 周末去参加了公司组织的羽毛球赛~
  105. </view>
  106. <view class="photos">
  107. <img src="../../assets/img/sharePic2.png" alt="">
  108. <img src="../../assets/img/sharePic3.png" alt="">
  109. <img src="../../assets/img/sharePic3.png" alt="">
  110. </view>
  111. </view>
  112. </view>
  113. <view class="item">
  114. <view class="date">
  115. <view class="day">
  116. 15
  117. </view>
  118. <view class="year-month">
  119. 2023.1
  120. </view>
  121. </view>
  122. <view class="content">
  123. <view class="title">
  124. 打工人必备!提高工作效率的电脑快捷键。~
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <u-divider border-color="#CFD2D5">已经到底了</u-divider>
  130. </view>
  131. </template>
  132. <script>
  133. export default {
  134. data() {
  135. return {
  136. flag: false,
  137. scrollTop: "",
  138. }
  139. },
  140. methods: {
  141. onPageScroll(e) {
  142. this.scrollTop = e.scrollTop;
  143. console.log(this.scrollTop);
  144. if (this.scrollTop >=44) {
  145. this.flag = true;
  146. } else {
  147. this.flag = false;
  148. }
  149. },
  150. }
  151. }
  152. </script>
  153. <style scoped lang="scss">
  154. page{
  155. background-color: #fff;
  156. padding-bottom: 50px;
  157. }
  158. .header{
  159. padding: 0 0 48rpx 0;
  160. background: linear-gradient(180deg, rgba(183,208,255,1) 0%,rgba(244,244,246,1) 100%);
  161. .navbar{
  162. display: flex;
  163. justify-content: space-between;
  164. align-items: center;
  165. height: 44px;
  166. padding: 0 32rpx;
  167. .title{
  168. font-size: 16px;
  169. color: rgba(16, 16, 16, 1);
  170. }
  171. }
  172. .sticky{
  173. background-color: #fff;
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. height: 44px;
  178. padding: 0 32rpx;
  179. position: fixed;
  180. top: 0;
  181. left: 0;
  182. right: 0;
  183. .title{
  184. font-size: 16px;
  185. color: rgba(16, 16, 16, 1);
  186. }
  187. }
  188. // 个人信息
  189. .person-infos{
  190. margin-top: 32rpx;
  191. padding: 0 48rpx;
  192. display: flex;
  193. align-items: center;
  194. margin-bottom: 48rpx;
  195. .photo {
  196. box-shadow: 0px 2px 8px 0px rgba(35, 72, 75, 15);
  197. border: 2px solid rgba(255, 255, 255, 1);
  198. border-radius: 50px;
  199. width: 120rpx;
  200. height: 120rpx;
  201. overflow: hidden;
  202. img {
  203. vertical-align: middle;
  204. border-radius: 50px;
  205. width: 120rpx;
  206. height: 120rpx;
  207. }
  208. }
  209. .infos {
  210. margin-left:32rpx;
  211. .name {
  212. line-height: 28px;
  213. font-size: 20px;
  214. }
  215. .department-position {
  216. display: flex;
  217. margin-top: 16rpx;
  218. color: rgba(119, 119, 119, 1);
  219. .icon {
  220. margin-right: 8rpx;
  221. img {
  222. width: 28rpx;
  223. height: 28rpx;
  224. }
  225. }
  226. .department {
  227. display: flex;
  228. .text{
  229. line-height: 16px;
  230. }
  231. }
  232. .position {
  233. display: flex;
  234. margin-left: 24rpx;
  235. .text{
  236. line-height: 16px;
  237. }
  238. }
  239. }
  240. }
  241. }
  242. .grid {
  243. width: 100%;
  244. display: flex;
  245. flex-direction: row;
  246. flex-wrap: wrap;
  247. align-items: center;
  248. margin-top: 24rpx;
  249. justify-content: space-between;
  250. .item {
  251. width: 33.3%;
  252. text-align: center;
  253. .amout {
  254. font-size: 48rpx;
  255. line-height: 64rpx;
  256. }
  257. .text {
  258. font-size: 32rpx;
  259. line-height: 44rpx;
  260. }
  261. }
  262. }
  263. }
  264. .share{
  265. padding: 32rpx;
  266. .item{
  267. margin-bottom: 48rpx;
  268. display: flex;
  269. .date{
  270. .day{
  271. color: rgba(51, 51, 51, 1);
  272. font-size: 18px;
  273. font-weight:bold;
  274. line-height: 25px;
  275. }
  276. .year-month{
  277. color: rgba(51, 51, 51, 1);
  278. }
  279. }
  280. .content{
  281. margin-left: 52rpx;
  282. border-bottom: 1px solid rgba(232, 232, 232, 1);
  283. padding-bottom: 32rpx;
  284. .title{
  285. color: rgba(51, 51, 51, 1);
  286. font-size: 16px;
  287. margin-bottom: 16rpx;
  288. line-height: 22px;
  289. }
  290. .photos{
  291. img{
  292. width: 248rpx;
  293. height: 248rpx;
  294. border-radius: 16rpx;
  295. margin-right: 16rpx;
  296. }
  297. }
  298. }
  299. }
  300. .item:last-of-type{
  301. .content{
  302. border: none;
  303. }
  304. }
  305. }
  306. </style>