预算配置

This commit is contained in:
2023-02-09 22:46:38 +08:00
parent 7a7884abf5
commit 432b4f9815
8 changed files with 79 additions and 43 deletions

View File

@@ -286,6 +286,9 @@ export default {
listBillsToday() {
return fetchPost('/user/bills/today', null,true,false);
},
listBillByAMonth(params){
return fetchPost('/user/bills/month' ,params,true,false);
},
listBillByAccount(params){
return fetchPost('/user/bills/account' ,params,true,false);
},
@@ -301,6 +304,9 @@ export default {
/**
* 预算处理
*/
getBudgetIndex(){
return fetchPost('/user/budget/index',null,true,false);
},
getBudget(){
return fetchPost('/user/budget',null,true,false);
},

View File

@@ -16,6 +16,12 @@ const formatDate = date => {
return `${[year, month, day].map(formatNumber).join('-')}`
}
const formatDateMonth = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
return `${[year, month].map(formatNumber).join('-')}`
}
const formatNumber = n => {
n = n.toString()
return n[1] ? n : `0${n}`
@@ -49,5 +55,6 @@ const getToken = () => {
module.exports = {
formatTime,
formatDate,
formatDateMonth,
getToken
}