article.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <!-- <view>QQ:323392278 云站网络</view> -->
  2. <template>
  3. <view class="page">
  4. <view class="page-content" style="margin-top: 1px;">
  5. <uni-list class="page-list">
  6. <!-- 水平排列,右图左文 -->
  7. <uni-list-item @tap="toDetails(item)" class="page-list-item" :thumb="staticPic+item.small_pic" :title="item.article_name"
  8. v-for="(item,index) in list">
  9. </uni-list-item>
  10. </uni-list>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import _get from "../../common/_get";
  16. import _data from "../../common/_data";
  17. import _hook from "../../common/_hook";
  18. export default {
  19. data() {
  20. return {
  21. list: [
  22. ]
  23. }
  24. },
  25. computed: {
  26. staticPic() {
  27. return _data.domainUrl()
  28. }
  29. },
  30. onShow() {
  31. let _this = this;
  32. _hook.routeSonHook();
  33. _get.getArticleList({}, function (ret) {
  34. _this.list = ret
  35. });
  36. },
  37. methods: {
  38. toDetails(item){
  39. uni.navigateTo({url:'detail?id='+item.id})
  40. }
  41. }
  42. }
  43. </script>
  44. <style>
  45. .page-head-img {
  46. height: 200px;
  47. width: 100%;
  48. }
  49. uni-view {
  50. line-height: normal !important;
  51. }
  52. </style>