fireBase.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="fireBashWrapper">
  3. <block>
  4. <view class="" style="margin-top:0">
  5. <view class="cu-list menu-avatar ">
  6. <view class="cu-item" v-for="(item,index) in this.getData" :key="index" @tap="goDetail(item)">
  7. <view class="cu-avatar" style="background-image:url(../../../static/fire-base1.png);"></view>
  8. <view class="content">
  9. <view class="pro-title">
  10. <view class="cut">{{item.title}}</view>
  11. </view>
  12. <view class="pro-des ">
  13. <view class="text-cut">
  14. {{item.author}}
  15. </view>
  16. </view>
  17. <view class="pro-date">{{item.release_time}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </block>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. getData:[]
  30. };
  31. },
  32. onLoad:function(option){
  33. this.getFireBaseList({'company_code':uni.getStorageSync('selectedCode')})
  34. },
  35. methods: {
  36. // 列表数据请求
  37. async getFireBaseList(params = {}) {
  38. const res = await this.$myRequest({
  39. url: 'KnowledgeBase/getKnowledgeBaseList',
  40. data:params,
  41. showLoading: true
  42. })
  43. this.getData=res.data.data;
  44. console.log(this.getData)
  45. },
  46. // 页面跳转
  47. goDetail(item){
  48. uni.navigateTo({
  49. url: '/pages/info/fireBashDetail/fireBashDetail?id='+item.id,
  50. success: res => {},
  51. fail: () => {},
  52. complete: () => {}
  53. });
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .processList{
  60. position:static;
  61. }
  62. </style>