resource-api.js 947 Bytes
import Api from './api';

class ResourceApi extends Api {
  constructor() {
    super();
  }

  list() {
    return this._post('/ufoPlatform/resource/getResources');
  }

  info(id) {
    return this._post('/ufoPlatform/resource/getResourceInfo', {
      id
    });
  }

  editResource(data) {
    return this._post('/ufoPlatform/resource/editResourceContentData', data);
  }

  editGoodsPool(data) {
    return this._post('/ufoPlatform/resource/batchEditResourceGoodsPool', data, true);
  }

  addResourceListItem(data) { // 添加资源位列表中的数据
    return this._post('/ufoPlatform/resource/addOrUpdateResource', data);
  }

  editResourceListItem(data) {// 编辑资源位列表中的某条数据
    return this._post('/ufoPlatform/resource/addOrUpdateResource', data);
  }

  addOrUpdateResourceDetail(data) {
    return this._post('/ufoPlatform/resource/addOrUpdateResourceDeatil', data, true);
  }
}

export default ResourceApi;