knowledge.wxml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!--pages/knowledge/knowledge.wxml-->
  2. <view class="search">
  3. <input bindinput='search' placeholder-style='color:#C8C8C8;' placeholder="输入名称/关键字搜索"></input>
  4. <image bindtap="search" mode="widthFix" src="../images/search.png"></image>
  5. </view>
  6. <view class="menu">
  7. <view class="picker" bindtap="showmenu">
  8. {{array[index]}} <text class="up"></text>
  9. </view>
  10. <view class="drop_menu" wx:if='{{show}}'>
  11. <text wx:for='{{array}}' bindtap="check" data-id='{{index}}'>{{item}}</text>
  12. </view>
  13. </view>
  14. <view class="tab">
  15. <text bindtap="tab" data-id='0' class="{{act == 0?'active':''}}">精品导读</text>
  16. <text bindtap="tab" data-id='1' class="{{act == 1?'active':''}}">刊群动态</text>
  17. <text bindtap="tab" data-id='2' class="{{act == 2?'active':''}}">知识地图</text>
  18. </view>
  19. <!-- <view style="text-align:center;margin:100px 0;" bindtap="getData" wx:if='{{list.length<=0}}'>点击重新加载</view> -->
  20. <swiper circular="{{true}}" class="myswiper" bindchange='swchange' current='{{act}}' autoplay="{{false}}">
  21. <swiper-item>
  22. <scroll-view scroll-y="true" scroll-into-view="{{scroll}}" bindscrolltolower='next' class="content">
  23. <navigator url="../actDetail/actDetail?id={{item.id}}" class="list" wx:for='{{list}}' wx:key="journals{{index}}">
  24. <image src="{{item.img}}"></image>
  25. <view>
  26. <view class="title"> <rich-text nodes="<div style='overflow:hidden;white-space:nowrap;text-overflow:ellipsis;'>{{item.name}}</div>"></rich-text></view>
  27. <view class="ly">
  28. <text style="float:right;">{{item.publish_time}}</text>
  29. <text class="nowrap">作者:{{item.author}}</text>
  30. <text class="">发布单位:{{item.journal_name}}</text>
  31. </view>
  32. <text class="">{{item.desc}}</text>
  33. </view>
  34. </navigator>
  35. <block wx:if='{{total>=20}}'>
  36. <view class='more' wx:if='{{list.length < total}}'>上拉加载更多...</view>
  37. <view class='more' wx:else>已加载全部数据!</view>
  38. </block>
  39. </scroll-view>
  40. </swiper-item>
  41. <swiper-item>
  42. <scroll-view scroll-y="true" scroll-into-view="{{scroll}}" bindscrolltolower='next1' class="content">
  43. <navigator url="../news/news?id={{item.id}}" class="list" wx:for='{{list1}}' wx:key="journals{{index}}">
  44. <image style="height:60px;" src="{{item.img}}"></image>
  45. <view>
  46. <view class="title"> <rich-text nodes="<div style='overflow:hidden;white-space:nowrap;text-overflow:ellipsis;'>{{item.name}}</div>"></rich-text></view>
  47. <view class="ly">
  48. <view>
  49. <text>{{item.publish_time}}</text>
  50. </view>
  51. <text class="nowrap">来源:{{item.journal_name}}</text>
  52. </view>
  53. <text>{{item.desc}}</text>
  54. </view>
  55. </navigator>
  56. <block wx:if='{{total1>=20}}'>
  57. <view class='more' wx:if='{{list1.length < total1}}'>上拉加载更多...</view>
  58. <view class='more' wx:else>已加载全部数据!</view>
  59. </block>
  60. </scroll-view>
  61. </swiper-item>
  62. <swiper-item>
  63. <view wx:if="{{act == 2}}">
  64. <image class='back-img' src='../../images/backimg.jpg' lazy-load='true'></image>
  65. </view>
  66. </swiper-item>
  67. </swiper>