notice.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="container">
  3. <view v-if="list.length > 0" class="list-box flex_item" v-for="(ls,index) in list" :key='index' @click="nav(index)">
  4. <image :src="ls.image_input[0]"></image>
  5. <view class="list-item">
  6. <view class="item-box flex">
  7. <view class="title">{{ls.title}}</view><!--
  8. <view class="time">{{ls.add_time}}</view> -->
  9. </view>
  10. <view class="info flex">
  11. <view class="clamp text-info">{{ls.synopsis}}</view>
  12. <view class="info-tip"></view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="empty-box" v-show="list.length === 0"><empty></empty></view>
  17. </view>
  18. </template>
  19. <script>
  20. import { article } from '@/api/index.js';
  21. import empty from '@/components/empty';
  22. export default {
  23. components: {
  24. empty
  25. },
  26. data() {
  27. return {
  28. list:''
  29. };
  30. },
  31. onLoad(option){
  32. this.loadDate();
  33. },
  34. onShow() {
  35. },
  36. methods: {
  37. async loadDate(){
  38. let obj = this;
  39. article({
  40. page:1,
  41. limit:10000
  42. },2).then(({ data }) => {
  43. console.log(data)
  44. });
  45. },
  46. nav(index){
  47. uni.navigateTo({
  48. url: '/pages/index/informationDetails?id=' + this.list[index].id
  49. })
  50. },
  51. }
  52. };
  53. </script>
  54. <style lang="scss" scoped>
  55. page {
  56. min-height: 100%;
  57. background-color: #ffffff;
  58. .container {
  59. background-color: #FFFFFF;
  60. width: 100%;
  61. padding: 25rpx 25rpx;
  62. }
  63. }
  64. .empty-box{
  65. margin-top: 100rpx;
  66. width: 100%;
  67. height: 500rpx;
  68. }
  69. .list-box{
  70. border-bottom: 1rpx solid #E3E3E3;
  71. padding: 25rpx 0rpx;
  72. image{
  73. width: 61rpx;
  74. height: 61rpx;
  75. border-radius: 100%;
  76. }
  77. .list-item{
  78. padding-left: 25rpx;
  79. width: 90%;
  80. .item-box{
  81. .title{
  82. font-weight: bold;
  83. color: #1D2023;
  84. font-size: 30rpx;
  85. }
  86. .time{
  87. font-weight: 500;
  88. color: #999999;
  89. font-size: 20rpx;
  90. }
  91. }
  92. .info{
  93. padding-top: 20rpx;
  94. .text-info{
  95. font-weight: 500;
  96. color: #999999;
  97. font-size: 24rpx;
  98. width: 90%;
  99. }
  100. .info-tip{
  101. width: 11rpx;
  102. height: 11rpx;
  103. background-color: #FB555C;
  104. border-radius: 100%;
  105. }
  106. }
  107. }
  108. }
  109. </style>