index.wxml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!-- <My_tabs id='tabs' bind:onChange='tabChange' /> -->
  2. <van-tabs id='tabs' active="{{ content.type }}" color='var(--assist)' tab-active-class='tab-active-class' bind:change="tabChange">
  3. <van-tab title="系统消息" name='系统' />
  4. <van-tab title="应用消息" name='应用' />
  5. </van-tabs>
  6. <My_listBox id="ListBox" height="{{height}}" bind:getlist='getlist'>
  7. <view class="unread">总共{{total}}条</view>
  8. <navigator url="#" class='list' wx:for="{{list}}" data-item="{{item}}" bindtap="toDetails">
  9. <view class="title line-1">{{item.title}}</view>
  10. <view class="content line-1">{{item.message}}</view>
  11. <view class="time">
  12. <van-tag class="tag" wx:if="{{item.objectname}}" plain type="primary">{{type.query(item.objectname)}}</van-tag>{{item.createdate}}
  13. </view>
  14. <view wx:if="{{item.isread=='0'}}" class="unread-item" />
  15. </navigator>
  16. <My_empty wx:if="{{!list.length}}" />
  17. <view style="height: 180rpx;" />
  18. </My_listBox>
  19. <wxs module="type">
  20. module.exports.query = function (name) {
  21. var showName = '';
  22. switch (name) {
  23. case 'sat_courseware':
  24. showName = '商学院';
  25. break;
  26. case 'sat_sharematerial':
  27. showName = '推广素材';
  28. break;
  29. case 'sat_notice':
  30. showName = '通告';
  31. break;
  32. case 'sat_submitedit':
  33. showName = '提报';
  34. break;
  35. case 'sat_orderclue':
  36. showName = '销售线索';
  37. break;
  38. case 'sys_attachment':
  39. showName = '营销物料';
  40. break;
  41. default:
  42. showName = '其他应用';
  43. break;
  44. }
  45. return showName;
  46. }
  47. </wxs>