import BaseACTION from './base_action'
import { List } from '@api'

export default class ListAction extends BaseACTION {
  /* get传输方式 */
  getLiveList (obj) {
    return List.getLiveList(obj).then(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    }).catch(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    })
  }

  /* get传输方式 */
  getLiveDetail (id) {
    return List.getLiveDetail(id).then(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    }).catch(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    })
  }

  /* get传输方式 */
  getDetailUser (id) {
    return List.getDetailUser(id).then(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    }).catch(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    })
  }

  /* 获取直播回放的列表 */
  getPlaybackList (obj) {
    return List.getPlaybackList(obj).then(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    }).catch(res => {
      return res || { test: this.getVueInstance().$t('action.interface') }
    })
  }
}
