var VUE_APP_API_BASEURL = process.env.VUE_APP_API_BASEURL

export default {
  getPeriod(accountId) {
    // http://organization.test.hrs100.cn:18080/api/user/bill/account/period
    let url = VUE_APP_API_BASEURL + 'account/period';
    url = url.replace('{accountId}', accountId);
    return url;
  },
  getBillSummary(accountId) {
    //account/period/2176426/summary
    let url = VUE_APP_API_BASEURL + 'account/period/{accountId}/summary';
    url = url.replace('{accountId}', accountId);
    return url;
  },
  getBillHosting(accountId) {
    // http://organization.test.hrs100.cn:18080/api/user/bill/account/hosting/2176426/summary
    let url = VUE_APP_API_BASEURL + 'account/hosting/{accountId}/summary'
    url = url.replace('{accountId}', accountId);
    return url;
  },
  getFlow(accountId, page, pageSize) {
    // http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/flow?page=1&pageSize=10
    let url = VUE_APP_API_BASEURL + 'account/period/{accountId}/flow?page={page}&pageSize={pageSize}';
    url = url.replace('{accountId}', accountId);
    url = url.replace('{page}', page);
    url = url.replace('{pageSize}', pageSize);
    return url;
  },
  getReceiptList(accountId) {
    // http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/receipt/list
    let url = VUE_APP_API_BASEURL + 'account/period/{accountId}/receipt/list'
    url = url.replace('{accountId}', accountId);
    return url;
  },
  getReceiptDetail(accountId, type) {
    // http://organization.test.hrs100.cn:18080/api/user/bill/account/period/2176426/receipt/service/detail
    let url = VUE_APP_API_BASEURL + 'account/period/{accountId}/receipt/{type}/detail'
    url = url.replace('{accountId}', accountId);
    url = url.replace('{type}', type);
    return url;
  }
};