|
@@ -43,6 +43,7 @@ Page({
|
|
|
bindDateChange: function (e) {
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
this.setData({ today: e.detail.value })
|
|
|
+ this.searchDate();
|
|
|
},
|
|
|
// 禁止左右滑动
|
|
|
stopTab: function (e) {
|
|
@@ -169,12 +170,13 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad: function (options) {
|
|
|
+ let today = moment().format('YYYY-MM-DD');
|
|
|
+ this.setData({ today: today })
|
|
|
this.searchDate();
|
|
|
},
|
|
|
// 查询时间
|
|
|
searchDate: function () {
|
|
|
- let today = moment().format('YYYY-MM-DD');
|
|
|
- if (today) this.setData({ today: today })
|
|
|
+ let today = this.data.today;
|
|
|
wx.request({
|
|
|
url: `${app.globalData.publicUrl}/api/st/dining/arrange/getByDate?date=` + today,
|
|
|
method: "get",
|