template.defaults.imports.getStatusName = function (status) {
    let result = ''
    switch (status) {
        case -2:
            result = '删除'
            break
        case -1:
            result = '被禁止'
            break
        case 0:
            result = '预告'
            break
        case 1:
            result = '正在直播'
            break
        case 2:
            result = '转录播中'
            break
        case 3:
            result = '回放'
            break
        case 10:
            result = '暂停'
            break
        default:
            break
    }
    return result
}
export const tpl = `
    <div class="cd-live-content J_liveContent">
        <div class="cd-top J_searchFrom">
            <!--sdkm中要屏蔽这部分ui-->
            {{ if !${window.page_data.isSDKM} }}
            <input class="cd-text-input J_liveId" type="text" placeholder="请输入直播ID">
            <div class="cd-search J_search">搜索</div>
            <div class="cd-restore J_restore">重置</div>
            <a class="cd-link" href="//conecli.com/page/app.html#/home" target="_blank">前往直播系统>></a>
            {{ /if }}
        </div>
        <div class="cd-table J_table">
        </div>
        <div class="cd-footer">
            <p class="cd-text">如配置了店铺二级页、自定义链接，仅支持松果站内的跳转，暂不支持微信松果购物小程序内的跳转，望悉知，谨慎配置。</p>
            <div class="cd-cancel J_cancel">取消</div>
            <div class="cd-ok J_ok">确定</div>
        </div>
    </div>
 `
export const itemTpl = `
    {{ if selected }}
    <tr class="cd-disabled">
    {{else}}
    <tr>
    {{/if}}
        <td>
            <input {{ if selected }} disabled="disabled" {{/if}} class="cd-radio cd-simulink-radio" type="radio" data-img="{{liveImage}}" data-link="{{liveId}}" data-original-data="{{liveId}}" name="liveId">
            <span>{{liveId}}</span>
        </td>
        <td>{{liveTitle}}</td>
        <td><img class="cd-live-img" src="{{liveImage}}" </td>
        <td>{{liveTime}}</td>
        <td>{{ status | getStatusName }}</td>
    </tr>
`