guidance-list.js 992 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. Vue.component('guidance-list', {
  2. template: '<ul class="consultation-list">\
  3. <li v-for="(list,index) in guidanceList" class="consultation-list-item" @click="viewDetail(list.id)">\
  4. <div class="con-user-info">\
  5. <p class="article-title">{{list.content}}</p>\
  6. <p class="user-problem">发送时间:{{list.createTime}}</p>\
  7. </div>\
  8. </li>\
  9. </ul>',
  10. data: function() {
  11. return {
  12. guidanceList: "",
  13. curPage:1
  14. }
  15. },
  16. props:["guidanceData"],
  17. methods: {
  18. viewDetail: function(id) {
  19. top.layer.open({
  20. type: 2,
  21. title: '指导详情',
  22. maxmin: true,
  23. area: ['1000px', '600px'],
  24. shadeClose: false,
  25. content: '../html/lay_gui_article_detail.html?id='+id
  26. })
  27. }
  28. },
  29. watch:{
  30. guidanceData:function(val){
  31. this.guidanceList=this.guidanceData;
  32. }
  33. },
  34. mounted: function() {
  35. var divH = $("#tab-iframe",parent.document).height() - 75;
  36. $(".consultation-list").slimScroll({ height: divH,color: '#666'});
  37. }
  38. })