add journal-date
This commit is contained in:
@ -82,20 +82,6 @@ Page({
|
||||
list: []
|
||||
})
|
||||
this.fetch();
|
||||
// 可选日期
|
||||
wx.request({
|
||||
url: `${config.url}/journal/list/date?key=${wx.getStorageSync("key")}`,
|
||||
method: "GET",
|
||||
success: async (resp: any) => {
|
||||
const dates = resp.data.data.sort((a: number, b: number) => a - b);
|
||||
this.setData({
|
||||
// dateFilterMin: dates[0],
|
||||
// dateFilterMax: dates[dates.length - 1],
|
||||
dateFilterAllows: dates,
|
||||
// dateFilterVisible: this.data.dateFilterVisible
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady() {
|
||||
this.getCustomNavbarHeight();
|
||||
@ -121,17 +107,25 @@ Page({
|
||||
isShowMoreMenu: !this.data.isShowMoreMenu
|
||||
})
|
||||
},
|
||||
openDateFilter() {
|
||||
this.setData({
|
||||
dateFilterVisible: true
|
||||
});
|
||||
toCreater() {
|
||||
wx.navigateTo({
|
||||
"url": "/pages/main/journal-creater/index?from=journal"
|
||||
})
|
||||
},
|
||||
tapCalendar(e: any) {
|
||||
console.log(e);
|
||||
toSearch() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-search/index"
|
||||
})
|
||||
},
|
||||
toDateFilter(e: any) {
|
||||
console.log(e);
|
||||
// console.log(Toolkit.symmetricDiff(this.data.dateFilter.allows, e.detail.value));
|
||||
toMap() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-map/index"
|
||||
})
|
||||
},
|
||||
toDate() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-date/index"
|
||||
})
|
||||
},
|
||||
fetch() {
|
||||
if (this.data.isFetching || this.data.isFinished) {
|
||||
@ -224,19 +218,4 @@ Page({
|
||||
});
|
||||
}
|
||||
},
|
||||
toCreater() {
|
||||
wx.navigateTo({
|
||||
"url": "/pages/main/journal-creater/index?from=journal"
|
||||
})
|
||||
},
|
||||
toSearch() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-search/index"
|
||||
})
|
||||
},
|
||||
toMap() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/main/journal-map/index"
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user