Commit 9481e676 authored by Facius's avatar Facius

improve: 首页日期选择

parent 1c2ad3a2
Pipeline #2970 canceled with stages
......@@ -44,7 +44,7 @@
hover-class="u-hover-class"
@click="$u.throttle(handleSelectDate, 500)"
>
<view class="date-view">{{ date }}</view>
<view class="date-view">{{ dateString }}</view>
<u-icon
name="arrow-down-fill"
color="#ffffff"
......@@ -152,7 +152,7 @@ export default {
showDatePicker: false,
visible: false,
weather: { city: '-', temp: '-' },
date: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm'),
date: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm') + '-01',
money: {
income: '0',
expense: '0',
......@@ -319,11 +319,11 @@ export default {
},
handleComfirmDate(date) {
console.log(date)
this.date = `${date.year}-${date.month}`
this.date = `${date.year}-${date.month}-${date.day}`
this.monthRecord()
},
monthRecord() {
monthRecord({ month: this.date + '-01' })
monthRecord({ month: this.date})
.then((res) => {
var obj = res.data
if (obj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment