diff --git a/pages/advanceOrder/index.vue b/pages/advanceOrder/index.vue
index 9b4e2d0..e46518b 100644
--- a/pages/advanceOrder/index.vue
+++ b/pages/advanceOrder/index.vue
@@ -2,18 +2,14 @@
-
-
-
-
- {{ newDate }}
-
-
-
-
+
+
+
+
+ {{ item.showDate }}
+
+
+
@@ -187,6 +183,8 @@ export default {
components: { Tabs },
data() {
return {
+ daysList:[],//日期列表
+ hIndex:0,//日期选中index
fontValue:uni.getStorageSync('fontSize') || 8,
showLoading:true,
newDate: '',
@@ -238,18 +236,32 @@ export default {
},200)
},
methods: {
- //获取预定日期
+ //获取预定日期
async getReserveDate(){
let param = {
"canteenId":this.canteenId,
"stallId":this.stallId
}
- const res = await getlistReserveDateAPI(param)
- this.getNowFormatDate(res.data[0])
- this.getNowFormatDate2(res.data[0])
+ const res = await getlistReserveDateAPI(param)
+ res.data.forEach(item=>{
+ let obj = {
+ showDate:this.getNowFormatDate(item),
+ paramDate:this.getNowFormatDate2(item)
+ }
+ this.daysList.push(obj)
+ })
+ this.newDate = this.daysList[0].showDate
+ this.newDate2 = this.daysList[0].paramDate
//获取预定餐菜谱
this.getMenuListData()
},
+ //改变时间
+ changeDay(index){
+ this.hIndex=index;
+ this.newDate = this.daysList[index].showDate
+ this.newDate2 = this.daysList[index].paramDate
+ this.getMenuListData()
+ },
// 获取当前时间
getNowFormatDate(data) {
let date = new Date(data)
@@ -258,7 +270,8 @@ export default {
let day = date.getDate().toString().padStart(2, '0')
let week = date.getDay()
let weeks = ['日', '一', '二', '三', '四', '五', '六']
- this.newDate = `${month}-${day} 星期${weeks[week]}`
+ return `${month}-${day} 星期${weeks[week]}`
+ // this.newDate = `${month}-${day} 星期${weeks[week]}`
},
// 当前时间 2025-01-03
getNowFormatDate2(data) {
@@ -266,7 +279,8 @@ export default {
let year = date.getFullYear()
let month = (date.getMonth() + 1).toString().padStart(2, '0')
let day = date.getDate().toString().padStart(2, '0')
- this.newDate2 = `${year}-${month}-${day}`
+ return `${year}-${month}-${day}`
+ // this.newDate2 = `${year}-${month}-${day}`
},
// 获取菜谱
@@ -653,6 +667,21 @@ page {
background: #f9fbff;
position: relative;
}
+.date-view {
+ white-space: nowrap;
+ background-color: #FFF;
+ width: 100%;
+ .scroll-view-item {
+ display: inline-block;
+ width: 200rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ text-align: center;
+ font-size: 24rpx;
+ margin-left: 16px;
+ }
+}
+
.scroll-view {
white-space: nowrap;
width: 100%;
diff --git a/pages/weeklyMenu/menuList.vue b/pages/weeklyMenu/menuList.vue
index c80a410..58f1cb5 100644
--- a/pages/weeklyMenu/menuList.vue
+++ b/pages/weeklyMenu/menuList.vue
@@ -228,8 +228,7 @@ page {
}
.date-view {
white-space: nowrap;
- width: 100%;
-
+ width: 100%;
}
.scroll-view-item {
display: inline-block;
diff --git a/pages/work/details.vue b/pages/work/details.vue
index 9e9d83a..cb62713 100644
--- a/pages/work/details.vue
+++ b/pages/work/details.vue
@@ -11,7 +11,7 @@
您对本单满意吗?
-
+
退单