index.wxml 1.2 KB

123456789101112131415161718192021222324252627
  1. <My_empty wx:if="{{list.length==0}}" />
  2. <navigator class="offer-list" url="/packageA/work/detail?id={{item.sys_taskid}}" wx:for="{{list}}" wx:key="sys_taskid">
  3. <view class="title">
  4. <text class="line-1">{{item.title}}</text>
  5. <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{item.status}}</view>
  6. </view>
  7. <view class="tag-box">
  8. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{tag}}</van-tag>
  9. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:key="index" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{tag}}</van-tag>
  10. </view>
  11. <view class="exp line-1">开始日期:<text>{{item.starttime}}</text></view>
  12. <view class="exp line-1">结束日期:<text>{{item.endtime||' --'}}</text></view>
  13. </navigator>
  14. <wxs module="backColor">
  15. module.exports.getColor = function (status) {
  16. var color = null;
  17. if (status == '待执行') {
  18. color = '#3874F6';
  19. } else if (status == '进行中') {
  20. color = '#52C41A';
  21. } else {
  22. color = '#BBB';
  23. };
  24. return color
  25. }
  26. </wxs>