myCollection.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div class="myCollection">
  3. <div class="collItem" v-for="item in collList">
  4. <span class="collType">【{{item.collectorsType==='1'?'园区通知':'物业通知'}}】</span>
  5. <span class="collTheme">{{item.title}}</span>
  6. <span class="collTime">{{ item.publishDate }}</span>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. import { parkUserCollectorsList, getUserLocalStorageInfo} from "@/js_sdk/http.js";
  12. export default {
  13. name: "myCollection",
  14. data(){
  15. return{
  16. collList:[],
  17. userId: getUserLocalStorageInfo().userId,
  18. }
  19. },
  20. mounted(){
  21. this.getList()
  22. },
  23. onPullDownRefresh() {
  24. this.getList()
  25. setTimeout(function () {
  26. uni.stopPullDownRefresh();
  27. }, 1000);
  28. },
  29. methods:{
  30. getList() {
  31. parkUserCollectorsList({userId:this.userId}).then(res=>{
  32. this.collList = res
  33. })
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. .myCollection{
  40. padding: 12rpx 0 50rpx 0;
  41. .collItem{
  42. width: 686rpx;
  43. margin: 24rpx 32rpx;
  44. background: white;
  45. border-radius: 16rpx;
  46. display: flex;
  47. flex-direction: column;
  48. padding: 32rpx 32rpx;
  49. box-sizing: border-box;
  50. .collType{
  51. color: rgba(3, 101, 249, 1);
  52. font-size: 28rpx;
  53. }
  54. .collTheme{
  55. color: rgba(51, 51, 51, 1);
  56. font-size: 28rpx;
  57. line-height: 42rpx;
  58. display: flex;
  59. flex-wrap: wrap;
  60. margin: 16rpx 0;
  61. }
  62. .collTime{
  63. color:rgba(102, 102, 102, 1);
  64. font-size: 28rpx;
  65. }
  66. }
  67. }
  68. </style>