import request from '@/utils/request';

export async function getServiceurl () {
  const res = await request.get('sys/jimureport/getServiceurl');
  if (res.data.code == 0 && res.data.data) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function getPrintMap () {
  const res = await request.get('sys/jimureport/getPrintMap');
  if (res.data.code == 0 && res.data.data) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function getJmPrintViewUrl (code) {
  const res = await request.get('sys/jimureport/getJmPrintViewUrl/'+code);
  if (res.data.code == 0 && res.data.data) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}