meaasge.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="content">
  3. <view v-if="list.length > 0" class="list-Box flex" v-for="(ls,index) in list" :key='index'>
  4. <view class="list-info">
  5. <view class="title">{{ls.title}}</view>
  6. <view class="info">{{ls.synopsis}}</view>
  7. </view>
  8. <view class="time">{{ls.add_time}}</view>
  9. </view>
  10. <view class="empty-box" v-show="list.length === 0"><empty></empty></view>
  11. </view>
  12. </template>
  13. <script>
  14. import { article } from '@/api/index.js';
  15. import empty from '@/components/empty';
  16. export default {
  17. components: {
  18. empty
  19. },
  20. data() {
  21. return {
  22. list:''
  23. };
  24. },
  25. onLoad() {
  26. this.loadDate();
  27. },
  28. methods: {
  29. async loadDate(){
  30. let obj = this;
  31. article({
  32. page:1,
  33. limit:10000
  34. },2).then(({ data }) => {
  35. console.log(data)
  36. });
  37. },
  38. }
  39. };
  40. </script>
  41. <style lang="scss">
  42. page {
  43. height: 100%;
  44. .content {
  45. height: 100%;
  46. padding: 35rpx 29rpx;
  47. }
  48. }
  49. .empty-box{
  50. margin-top: 100rpx;
  51. width: 100%;
  52. height: 500rpx;
  53. }
  54. .list-Box{
  55. margin-bottom: 60rpx;
  56. .list-info{
  57. .title{
  58. font-size: 30rpx;
  59. font-weight: 500;
  60. color: #333333;
  61. line-height: 55rpx;
  62. }
  63. .info{
  64. font-size: 24rpx;
  65. font-weight: 500;
  66. color: #999999;
  67. }
  68. }
  69. .time{
  70. font-size: 22rpx;
  71. font-weight: 500;
  72. color: #333333;
  73. }
  74. }
  75. </style>