Commit 9481e676 authored by Facius's avatar Facius

improve: 首页日期选择

parent 1c2ad3a2
Pipeline #2970 canceled with stages
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
hover-class="u-hover-class" hover-class="u-hover-class"
@click="$u.throttle(handleSelectDate, 500)" @click="$u.throttle(handleSelectDate, 500)"
> >
<view class="date-view">{{ date }}</view> <view class="date-view">{{ dateString }}</view>
<u-icon <u-icon
name="arrow-down-fill" name="arrow-down-fill"
color="#ffffff" color="#ffffff"
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
showDatePicker: false, showDatePicker: false,
visible: false, visible: false,
weather: { city: '-', temp: '-' }, weather: { city: '-', temp: '-' },
date: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm'), date: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm') + '-01',
money: { money: {
income: '0', income: '0',
expense: '0', expense: '0',
...@@ -319,11 +319,11 @@ export default { ...@@ -319,11 +319,11 @@ export default {
}, },
handleComfirmDate(date) { handleComfirmDate(date) {
console.log(date) console.log(date)
this.date = `${date.year}-${date.month}` this.date = `${date.year}-${date.month}-${date.day}`
this.monthRecord() this.monthRecord()
}, },
monthRecord() { monthRecord() {
monthRecord({ month: this.date + '-01' }) monthRecord({ month: this.date})
.then((res) => { .then((res) => {
var obj = res.data var obj = res.data
if (obj) { 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