news.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="center">
  3. <view class="img">
  4. <image src="../../static/img/logo.png" mode=""></image>
  5. </view>
  6. <view class="test_title">
  7. 新闻动态
  8. </view>
  9. <view class="newBox" v-for="(item, index) in list" @click="nav('/pages/news/newsDetail?id='+item.id)">
  10. <view class="newBox-left">
  11. <image src="../../static/img/introduce.png" mode=""></image>
  12. </view>
  13. <view class="newBox-right">
  14. <view class="title">
  15. {{item.title}}
  16. </view>
  17. <view class="date">
  18. {{item.date}}
  19. </view>
  20. <view class="content">
  21. {{item.content}}
  22. </view>
  23. <view class="more">
  24. 更多......
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import {
  32. changeTaber
  33. } from '@/utils/tarberChange.js'
  34. export default {
  35. data() {
  36. return {
  37. list: [{
  38. title: '111',
  39. src: '111',
  40. date: '111',
  41. content: '111',
  42. }]
  43. }
  44. },
  45. onLoad() {
  46. // this,loadData();
  47. this.loadData()
  48. changeTaber(3)
  49. },
  50. methods: {
  51. async loadData() {
  52. const obj = this;
  53. },
  54. nav(url) {
  55. uni.navigateTo({
  56. url: url
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss">
  63. .img {
  64. margin: 17rpx 0 17rpx 41rpx;
  65. width: 208rpx;
  66. height: 52rpx;
  67. image {
  68. width: 100%;
  69. height: 100%;
  70. }
  71. }
  72. .test_title {
  73. display: flex;
  74. justify-content: center;
  75. align-items: center;
  76. width: 100%;
  77. height: 60rpx;
  78. font-size: 22rpx;
  79. font-family: Adobe Heiti Std;
  80. font-weight: normal;
  81. color: #FFFFFF;
  82. background-color: #0165B5;
  83. }
  84. </style>