预算配置
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user