import { request } from 'umi';
import { getDataBaseUrl,getStoremanagement } from '@/global_data';

export async function GetDevicePushRecodePage(data) {
    return request(getStoremanagement()+`/api/devicepushrecode/page`, {
      method: 'POST',
      data: data,
    });
  }
  export async function DevicePushRecodeAdd(data) {
      return request(getStoremanagement()+`/api/devicepushrecode/add`, {
        method: 'POST',
        data: data,
      });
    }
    export async function DevicePushRecodeUpdate(data) {
      return request(getStoremanagement()+`/api/devicepushrecode/update?id=`+data, {
        method: 'get',
        data: data,
      });
    }
    export async function DevicePushRecodeDelete(data) {
      return request(getStoremanagement()+`/api/devicepushrecode/delete`, {
        method: 'POST',
        data: data,
      });
    } 
    export async function GetDeviceList() {
      return request(getDataBaseUrl()+`/api/device/list`, {
        method: 'GET',
      });
    }
    export async function GetGoodsTypeTree(params) {
        return request(getDataBaseUrl()+'​/api​/goodstype/tree', {
          method: 'GET',
          data: {
            ...params,
          },
        });
      }
    export async function GetGoodsPage(data) {
        return request(getDataBaseUrl()+`/api/goods/page`, {
          method: 'Post',
          data: data,
          // params: { ...params },
          // ...(options || {}),
        });
      }
