<!--packageA/activity/modules/list/index.wxml-->
<navigator class="offer-list" url="/packageA/activity/detail?id={{item.sat_campaignid}}" wx:for="{{list}}" wx:key="sat_campaignid">
    <view class="title">
        <text class="line-1">{{item.name}}</text>
        <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{item.status}}</view>
    </view>
    <view class="exp line-1">活动类型:<text>{{item.type}}</text></view>
    <view class="exp line-1">线索数:<text>{{item.ordercluecount}}</text></view>
    <view class="exp line-1">负责人:<text>{{item.leader[0].name|| '--'}}</text></view>
</navigator>

<My_empty wx:if="{{list.length == 0}}" />

<wxs module="backColor">
    module.exports.getColor = function (status) {
        var color = null;
        if (status == '新建') {
            color = '#3874F6';
        } else if (status == '发布') {
            color = '#52C41A';
        } else {
            color = '#FA8C16';
        };
        return color
    }
</wxs>