Bladeren bron

修改预约时间样式

暖心小太阳 15 uur geleden
bovenliggende
commit
ceb45b126e

+ 253 - 278
pages/checkout/checkout.js

@@ -6,9 +6,9 @@ var app = getApp();
 
 Page({
   data: {
-		traceId:'',//视频号的traceid
-		requireOrder:0,//视频号 是否需要推单,1:需要,0:不需要
-		increaseSumPrice:0,
+    traceId: '', //视频号的traceid
+    requireOrder: 0, //视频号 是否需要推单,1:需要,0:不需要
+    increaseSumPrice: 0,
     isRecommend: false,
     isNoMatch: true,
     codeShow: false,
@@ -23,8 +23,8 @@ Page({
     popupType: 1, //1单次预约 2 选择服务频次 3选择首次预约时间
     // timeList: check.getTimeList(1),
     timeList: [],
-		// dateList: util.getDateList(new Date(new Date().getTime() + 60 * 60 * 1000 * 24 * 0), 1, 21),
-		dateList:[],
+    // dateList: util.getDateList(new Date(new Date().getTime() + 60 * 60 * 1000 * 24 * 0), 1, 21),
+    dateList: [],
     // firstAppointList:util.getDateList(new Date(new Date().getTime()+60*60*1000*24),7),
     firstAppointList: [],
     timeIndex: '', //选中的时间段
@@ -99,8 +99,8 @@ Page({
     orderTotalPrice: 0.00, //订单总价
     actualPrice: 0.00, //实际需要支付的总价
     cartId: 0,
-		addressId: 0,
-		addressMsg:'',
+    addressId: 0,
+    addressMsg: '',
     couponId: 0,
     userCouponId: 0,
     message: '',
@@ -114,10 +114,16 @@ Page({
     fraId: '', //加盟商id
     rId: '', //阿姨推荐码
     channelId: 5, //渠道id
-		goodsType: 1 ,//商品类型 如果是6 可以不填写预约时间,
-		serviceDuration:'',
-		noonType: 1,
+    goodsType: 1, //商品类型 如果是6 可以不填写预约时间,
+    serviceDuration: '',
+    noonType: 1,
     selectTimeValue: '',
+    date: '',
+    week: '',
+    time: '',
+    selectweek: '一周一次',
+    weekday: '周一',
+    selecttime: ''
   },
   //获取checkou信息
   getCheckoutInfo: function (appType) {
@@ -146,8 +152,8 @@ Page({
           freightPrice: res.data.freightPrice,
           goodsTotalPrice: res.data.goodsTotalPrice,
           orderTotalPrice: res.data.orderTotalPrice,
-					addressId: res.data.addressId,
-					addressMsg: res.data.addressMsg,
+          addressId: res.data.addressId,
+          addressMsg: res.data.addressMsg,
           couponId: res.data.couponId,
           userCouponId: res.data.userCouponId,
           grouponRulesId: res.data.grouponRulesId,
@@ -156,11 +162,11 @@ Page({
           popupType: res.data.checkedGoodsList[0].product.serviceTimes == 1 ? 1 : 2,
           bookStartDate: res.data.bookStartDate,
           bookEndDate: res.data.bookEndDate,
-					goodsType: res.data.goodsType,
-					increaseSumPrice:res.data.increaseSumPrice,
-					serviceDuration:res.data.serviceDuration
+          goodsType: res.data.goodsType,
+          increaseSumPrice: res.data.increaseSumPrice,
+          serviceDuration: res.data.serviceDuration
         });
-        let  serviceDuration =res.data.checkedGoodsList[0].product.serviceDuration;
+        let serviceDuration = res.data.checkedGoodsList[0].product.serviceDuration;
         if (that.data.popupType == 2) {
           let timeList = [];
           if (res.data.timeRange != null && res.data.timeRange.length > 0) {
@@ -179,12 +185,12 @@ Page({
 
 
         }
-				if(res.data.addressId==null&&res.data.addressMsg!=null){
-					wx.showToast({
-						title: res.data.addressMsg,
-						icon:'none'
-					})
-				}
+        if (res.data.addressId == null && res.data.addressMsg != null) {
+          wx.showToast({
+            title: res.data.addressMsg,
+            icon: 'none'
+          })
+        }
         // that.LimitCanAppointmentDate();
 
       }
@@ -351,8 +357,7 @@ Page({
       var addressId = wx.getStorageSync('addressId');
       if (addressId === "") {
         addressId = 0;
-      }else if (typeof addressId === 'number') {
-      } else if ( (typeof addressId === 'string'&& addressId.indexOf("{") !== -1)||addressId.length>20) {
+      } else if (typeof addressId === 'number') {} else if ((typeof addressId === 'string' && addressId.indexOf("{") !== -1) || addressId.length > 20) {
         addressId = JSON.parse(addressId).id;
       }
       var couponId = wx.getStorageSync('couponId');
@@ -410,18 +415,18 @@ Page({
   submitOrder: function () {
     let that = this;
     if (that.data.addressId <= 0) {
-			//所选地址无服务门店,或选择其他地址
-			let errmsg=that.data.addressMsg==''?'请选择收货地址':that.data.addressMsg;
-			//util.showErrorToast(errmsg);
-			wx.showModal({
-				title: '提示',
-				content: errmsg,
-				showCancel:false,
-			});
+      //所选地址无服务门店,或选择其他地址
+      let errmsg = that.data.addressMsg == '' ? '请选择收货地址' : that.data.addressMsg;
+      //util.showErrorToast(errmsg);
+      wx.showModal({
+        title: '提示',
+        content: errmsg,
+        showCancel: false,
+      });
       return;
     }
     // 检查是否已经预约
-    if (that.data.goodsType != 6&&that.data.goodsType != 4 && that.data.isNeedAppoint && !that.data.isFinishAppoint) {
+    if (that.data.goodsType != 6 && that.data.goodsType != 4 && that.data.isNeedAppoint && !that.data.isFinishAppoint) {
       // util.showErrorToast('请先预约服务时间');
       wx.showToast({
         title: '请先预约服务时间',
@@ -480,7 +485,7 @@ Page({
       let params = {
         weeks: weeks,
         type: 0,
-        startDate: this.data.isNeedAppoint?this.data.dateList[this.data.dateIndex].bookdate:null,
+        startDate: this.data.isNeedAppoint ? this.data.dateList[this.data.dateIndex].bookdate : null,
         lng: this.data.checkedAddress.lng,
         lat: this.data.checkedAddress.lat,
         shopId: this.data.checkedAddress.shopId,
@@ -493,7 +498,7 @@ Page({
   },
 
   orderPay(orderData) {
-		let that=this;
+    let that = this;
     var orderInfo = {
       cartId: this.data.cartId,
       addressId: this.data.addressId,
@@ -510,9 +515,9 @@ Page({
       fraId: this.data.fraId, //加盟商id
       channelId: this.data.channelId, //渠道码
       //预约参数信息
-			orderDate: orderData,
-			requireOrder:this.data.requireOrder,
-			traceId:this.data.traceId//视频号
+      orderDate: orderData,
+      requireOrder: this.data.requireOrder,
+      traceId: this.data.traceId //视频号
     };
     if (this.data.codeShow && !this.data.isNoMatch) {
       orderInfo.recCode = this.data.recCode;
@@ -521,21 +526,21 @@ Page({
     util.request(api.OrderSubmit, orderInfo, 'POST').then(res => {
 
 
-				//视频号,校验 wx.checkBeforeAddOrder
-		wx.checkBeforeAddOrder({
-			success (res) {
-				console.log("checkBeforeAddOrder-success:",res);
-				if(res.data.errcode==0){
-					that.setData({
-						traceId:res.data.traceId,
-						requireOrder:res.data.requireOrder
-					})
-				}
-			 },
-			fail (res) {
-				console.log("checkBeforeAddOrder-fail:",res);
-			 }
-		})
+      //视频号,校验 wx.checkBeforeAddOrder
+      wx.checkBeforeAddOrder({
+        success(res) {
+          console.log("checkBeforeAddOrder-success:", res);
+          if (res.data.errcode == 0) {
+            that.setData({
+              traceId: res.data.traceId,
+              requireOrder: res.data.requireOrder
+            })
+          }
+        },
+        fail(res) {
+          console.log("checkBeforeAddOrder-fail:", res);
+        }
+      })
 
 
 
@@ -562,85 +567,81 @@ Page({
         }, 'POST').then(res => {
           if (res.errno === 0) {
             const payParam = res.data;
-						console.log("支付过程开始");
-						if(this.data.requireOrder==1){
-							//视频号支付
-							wx.requestOrderPayment({
-								'timeStamp': payParam.timeStamp,
-								'nonceStr': payParam.nonceStr,
-								'package': payParam.packageValue,
-								'signType': payParam.signType,
-								'paySign': payParam.paySign,
-								'success': res => {
-									console.log("支付过程成功");
-									if (grouponLinkId) {
-										setTimeout(() => {
-											wx.redirectTo({
-												url: '/pages/groupon/grouponDetail/grouponDetail?id=' + grouponLinkId
-											})
-										}, 1000);
-									} else {
-										wx.redirectTo({
-											url: '/pages/checkout/payResult/payResult?status=1&orderId=' + orderId + '&actualPrice=' + this.data.actualPrice
-										});
-									}
-								},
-								'fail': res => {
-									console.log("支付过程失败");
-
-									// wx.redirectTo({
-									//   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
-									// });
-									// 弹出支付失败
-									this.setData({
-										payFailShow: true,
-										remarkDisable: true
-
-									});
-								},
-								'complete': function (res) {
-									console.log("支付过程结束")
-								}
-							});
-						}else{
-							wx.requestPayment({
-								'timeStamp': payParam.timeStamp,
-								'nonceStr': payParam.nonceStr,
-								'package': payParam.packageValue,
-								'signType': payParam.signType,
-								'paySign': payParam.paySign,
-								'success': res => {
-									console.log("支付过程成功");
-									if (grouponLinkId) {
-										setTimeout(() => {
-											wx.redirectTo({
-												url: '/pages/groupon/grouponDetail/grouponDetail?id=' + grouponLinkId
-											})
-										}, 1000);
-									} else {
-										wx.redirectTo({
-											url: '/pages/checkout/payResult/payResult?status=1&orderId=' + orderId + '&actualPrice=' + this.data.actualPrice
-										});
-									}
-								},
-								'fail': res => {
-									console.log("支付过程失败");
-
-									// wx.redirectTo({
-									//   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
-									// });
-									// 弹出支付失败
-									this.setData({
-										payFailShow: true,
-										remarkDisable: true
-
-									});
-								},
-								'complete': function (res) {
-									console.log("支付过程结束")
-								}
-							});
-						}
+            console.log("支付过程开始");
+            if (this.data.requireOrder == 1) {
+              //视频号支付
+              wx.requestOrderPayment({
+                'timeStamp': payParam.timeStamp,
+                'nonceStr': payParam.nonceStr,
+                'package': payParam.packageValue,
+                'signType': payParam.signType,
+                'paySign': payParam.paySign,
+                'success': res => {
+                  console.log("支付过程成功");
+                  if (grouponLinkId) {
+                    setTimeout(() => {
+                      wx.redirectTo({
+                        url: '/pages/groupon/grouponDetail/grouponDetail?id=' + grouponLinkId
+                      })
+                    }, 1000);
+                  } else {
+                    wx.redirectTo({
+                      url: '/pages/checkout/payResult/payResult?status=1&orderId=' + orderId + '&actualPrice=' + this.data.actualPrice
+                    });
+                  }
+                },
+                'fail': res => {
+                  console.log("支付过程失败");
+
+                  // wx.redirectTo({
+                  //   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
+                  // });
+                  // 弹出支付失败
+                  this.setData({
+                    payFailShow: true,
+                    remarkDisable: true
+
+                  });
+                },
+                'complete': function (res) {
+                  console.log("支付过程结束")
+                }
+              });
+            } else {
+              wx.requestPayment({
+                'timeStamp': payParam.timeStamp,
+                'nonceStr': payParam.nonceStr,
+                'package': payParam.packageValue,
+                'signType': payParam.signType,
+                'paySign': payParam.paySign,
+                'success': res => {
+                  console.log("支付过程成功");
+                  if (grouponLinkId) {
+                    setTimeout(() => {
+                      wx.redirectTo({
+                        url: '/pages/groupon/grouponDetail/grouponDetail?id=' + grouponLinkId
+                      })
+                    }, 1000);
+                  } else {
+                    wx.redirectTo({
+                      url: '/pages/checkout/payResult/payResult?status=1&orderId=' + orderId + '&actualPrice=' + this.data.actualPrice
+                    });
+                  }
+                },
+                'fail': res => {
+                  console.log("支付过程失败");
+                  // 弹出支付失败
+                  this.setData({
+                    payFailShow: true,
+                    remarkDisable: true
+
+                  });
+                },
+                'complete': function (res) {
+                  console.log("支付过程结束")
+                }
+              });
+            }
 
           } else {
             // 弹出支付失败
@@ -648,19 +649,14 @@ Page({
               payFailShow: true,
               remarkDisable: true
             });
-            // wx.redirectTo({
-            //   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
-            // });
           }
         });
 
       } else {
-				wx.showToast({
-					title: res.errmsg,
-					icon:'none'
-				})
-
-        // util.showErrorToast(res.errmsg);
+        wx.showToast({
+          title: res.errmsg,
+          icon: 'none'
+        })
       }
     });
   },
@@ -792,21 +788,21 @@ Page({
       })
     }
 
-		//视频号,校验 wx.checkBeforeAddOrder
-		wx.checkBeforeAddOrder({
-			success (res) {
-				console.log("checkBeforeAddOrder-success:",res);
-				if(res.data.errcode==0){
-					that.setData({
-						traceId:res.data.traceId,
-						requireOrder:res.data.requireOrder
-					})
-				}
-			 },
-			fail (res) {
-				console.log("checkBeforeAddOrder-fail:",res);
-			 }
-		})
+    //视频号,校验 wx.checkBeforeAddOrder
+    wx.checkBeforeAddOrder({
+      success(res) {
+        console.log("checkBeforeAddOrder-success:", res);
+        if (res.data.errcode == 0) {
+          that.setData({
+            traceId: res.data.traceId,
+            requireOrder: res.data.requireOrder
+          })
+        }
+      },
+      fail(res) {
+        console.log("checkBeforeAddOrder-fail:", res);
+      }
+    })
 
     var date = new Date();
     var year = date.getFullYear()
@@ -1012,75 +1008,78 @@ Page({
     let date = e.currentTarget.dataset.date;
     let week = e.currentTarget.dataset.week;
     let isbook = e.currentTarget.dataset.isbook;
-		console.info("dateCheck:" + index);
-		this.setData({
-			dateIndex: index
-		});
-		let period=this.data.dateList[this.data.dateIndex].period;
-		let current=(this.data.noonType==1?'上午':'下午');
-		let list=period.filter(item=>{
-			return item.ofTime==current;
-		});
-		this.setData({
-			timeList:list
-		});
-		let isNoTime=list.every(item=>{
-       return item.timeMsg&&item.timeMsg!=null;
-		});
-		if(isNoTime){
-			this.setData({
-				timeIndex:-1,
-				selectTimeValue:''
-			});
-		}
-    // if (this.data.checkedGoodsList[0].goodsId == 1190332) {
-    //   this.setData({
-    //     dateIndex: index
-    //   });
-    // } else if (isbook) { //前三天不可预约
-    //   this.setData({
-    //     dateIndex: index
-    //   });
-    //   this.getDayStock();
-    // }
-	},
-	noonTab(e) {
+    console.info("dateCheck:" + index);
+    this.setData({
+      dateIndex: index
+    });
+    let period = this.data.dateList[this.data.dateIndex].period;
+    let current = (this.data.noonType == 1 ? '上午' : '下午');
+    let list = period.filter(item => {
+      return item.ofTime == current;
+    });
+    let bookdate = this.data.dateList[this.data.dateIndex].bookdate
+    let weekOfDay = this.data.dateList[this.data.dateIndex].weekOfDay
+    this.setData({
+      timeList: list,
+      date: bookdate,
+      week: weekOfDay
+    });
+    let isNoTime = list.every(item => {
+      return item.timeMsg && item.timeMsg != null;
+    });
+    if (isNoTime) {
+      this.setData({
+        timeIndex: -1,
+        selectTimeValue: ''
+      });
+    }
+  },
+  noonTab(e) {
     let noon = e.currentTarget.dataset.noon;
 
     this.setData({
       timeIndex: -1,
-			noonType: noon,
-			selectTimeValue:'',
-		});
-		let period=this.data.dateList[this.data.dateIndex].period;
-		let current=(this.data.noonType==1?'上午':'下午');
-		let list=period.filter(item=>{
-			return item.ofTime==current;
-		});
-		this.setData({
-			timeList:list
-		});
+      noonType: noon,
+      selectTimeValue: '',
+    });
+    let period = this.data.dateList[this.data.dateIndex].period;
+    let current = (this.data.noonType == 1 ? '上午' : '下午');
+    let list = period.filter(item => {
+      return item.ofTime == current;
+    });
+    this.setData({
+      timeList: list
+    });
 
 
   },
   timeCheck(e) {
     let index = e.currentTarget.dataset.index;
-		// let stock = e.currentTarget.dataset.stock;
-		let msg=e.currentTarget.dataset.msg;
-    if (msg==null||msg=='') {
-			let time= (this.data.timeList[index].begin).split(':')[0];
-    this.setData({
-			timeIndex: index,
-			selectTimeValue: Number(time)
-    });
+    let toastMsg = e.currentTarget.dataset.toastmsg;
+    let msg = e.currentTarget.dataset.msg;
+    if (msg == null || msg == '') {
+      let time = (this.data.timeList[index].begin).split(':')[0];
+      let bookTime = this.data.timeList[index].begin + '-' + this.data.timeList[index].end
+      this.setData({
+        timeIndex: index,
+        selectTimeValue: Number(time),
+        time: bookTime
+      });
+    } else {
+      wx.showToast({
+        title: toastMsg,
+        icon: 'none'
+      })
     }
 
   },
   weekCheck(e) {
     let index = e.currentTarget.dataset.index;
+    let weekday = e.currentTarget.dataset.weekday;
+    console.log("weekday", weekday);
     this.setData({
       weekIndex: index,
-      // selectTimeIndex:'null'
+      weekday: weekday
     });
   },
 
@@ -1094,6 +1093,7 @@ Page({
       });
       this.setData({
         weekArrList: weekList,
+        selecttime: time
       });
       let itemData = "weekArrList[" + this.data.weekIndex + "].num";
       let selectedDateList = [];
@@ -1103,14 +1103,14 @@ Page({
         weekStr: this.data.weekArrList[this.data.weekIndex].week
       };
       selectedDateList.push(dateItem);
-      console.log(this.data);
+      // console.log(this.data);
       this.setData({
         selectTimeIndex: index,
         [itemData]: 1,
         selectedWeekList: [this.data.weekIndex],
         selectedDateList: selectedDateList
       });
-      console.log(this.data);
+      console.log("111",this.data.selectedDateList);
     } else {
 
       // 如果选中的时间段小于2个
@@ -1128,12 +1128,14 @@ Page({
           selectedWeekList.push(this.data.weekIndex);
         }
         this.setData({
+          selecttime: time,
           [itemData]: num + 1,
           selectTimeIndex: index,
           // selectedWeekList:selectedWeekList,
           selectedWeekList: [this.data.weekIndex],
           selectedDateList: selectedDateList
         });
+        console.log("222",this.data.selectedDateList);
       } else {
         // 删除第一个
         let firstTimeSelected = this.data.selectedDateList[0];
@@ -1146,6 +1148,7 @@ Page({
         selectedDateListDel.shift();
 
         this.setData({
+          selecttime: time,
           [itemDataDel]: numDel - 1,
           // selectTimeIndex:index,
           selectedDateList: selectedDateListDel
@@ -1177,9 +1180,9 @@ Page({
         this.setData({
           selectedWeekList: weekListNew,
         });
-
+        console.log("333",this.data.selectedDateList);
       }
-      console.log(this.data);
+      // console.log(this.data);
     }
 
   },
@@ -1194,6 +1197,20 @@ Page({
     weekList.forEach(item => {
       item.num = 0;
     });
+    if (e.detail.name == '1') {
+      this.setData({
+        selectweek: '一周1次'
+      })
+    } else if (e.detail.name == '2') {
+      this.setData({
+        selectweek: '一周2次'
+      })
+    } else {
+      this.setData({
+        selectweek: '两周1次'
+      })
+    }
+    console.log("selectweek", this.data.selectweek);
     this.setData({
       weekArrList: weekList,
       activeTab: e.detail.name,
@@ -1214,32 +1231,14 @@ Page({
       isFinishAppoint: false
     });
     if (this.data.popupType == '1') {
-
-      // let index = 2;
-      // let length = this.data.dateList.length;
-      // let list = this.data.dateList;
-      // for (let i = 0; i < length; i++) {
-      //   if (i < 7 && i >= 2 && list[i].week != '周六' && list[i].week != '周日') {
-      //     index = i;
-      //     break;
-
-      //   }
-      // }
-      // console.log(index);
-      // this.setData({
-      //   dateIndex: index
-      // })
-
-      // 获取时间段
-			// this.getDayStock();
-			this.getDayTime();
+      this.getDayTime();
     }
   },
   confirmTime() {
     console.log(this.data.activeTab);
     console.log(this.data);
     if (this.data.popupType == 1) {
-      if (this.data.timeIndex === ''||this.data.timeIndex<0) {
+      if (this.data.timeIndex === '' || this.data.timeIndex < 0) {
         wx.showToast({
           title: '请选择服务时间',
           icon: 'none',
@@ -1250,7 +1249,7 @@ Page({
 
       let date = this.data.dateList[this.data.dateIndex].bookdate;
       let week = this.data.dateList[this.data.dateIndex].weekOfDay;
-      let time = this.data.timeList[this.data.timeIndex].begin+'-'+this.data.timeList[this.data.timeIndex].end;
+      let time = this.data.timeList[this.data.timeIndex].begin + '-' + this.data.timeList[this.data.timeIndex].end;
       console.log(week, time);
       this.setData({
         oneTimeAppoint: date + ' ' + week + ' ' + time,
@@ -1325,17 +1324,8 @@ Page({
         remarkDisable: false,
         isFinishAppoint: true,
         popupType: 2,
-        // noSerTimes: res.data,
-        // appointFailTip: (res.data >= 1 ? true : false)
       });
 
-
-
-      //  this.setData({
-      //   choosePopup:false,
-      //   isFinishAppoint:true
-      //  });
-
     }
   },
   orderAppoint() {
@@ -1373,8 +1363,6 @@ Page({
             remarkDisable: false,
             isFinishAppoint: true,
             popupType: 2,
-            // noSerTimes: res.data,
-            // appointFailTip: (res.data >= 1 ? true : false)
           });
 
         } else {
@@ -1461,9 +1449,9 @@ Page({
       day: this.data.dateList[this.data.dateIndex].date,
       goodsId: this.data.checkedGoodsList[0].goodsId,
       lng: this.data.checkedAddress.lng,
-			lat: this.data.checkedAddress.lat,
-			productId:this.data.checkedGoodsList[0].product.id,
-			serviceDuration:this.data.serviceDuration
+      lat: this.data.checkedAddress.lat,
+      productId: this.data.checkedGoodsList[0].product.id,
+      serviceDuration: this.data.serviceDuration
     }
     wx.showLoading({
       title: '加载中',
@@ -1477,19 +1465,6 @@ Page({
             timeIndex: 0
 
           });
-          // let validList = this.data.timeList.filter(item => {
-          //   return item.stock > 0
-          // });
-          // if (validList.length > 0) {
-          //   this.setData({
-          //     timeIndex: validList[0].id - 1
-          //   });
-
-          // } else {
-          //   this.setData({
-          //     timeIndex: ''
-          //   });
-          // }
 
         } else {
 
@@ -1517,13 +1492,13 @@ Page({
         });
 
       });
-	},
-	getDayTime() {
+  },
+  getDayTime() {
 
     let params = {
-			days:30,
+      days: 30,
       productId: this.data.checkedGoodsList[0].productId,
-			serviceDuration:this.data.serviceDuration
+      serviceDuration: this.data.serviceDuration
     }
     wx.showLoading({
       title: '加载中',
@@ -1533,18 +1508,18 @@ Page({
         wx.hideLoading();
         if (res.errno == 0) {
           this.setData({
-						dateList: res.data,
-						dateIndex:0,
-						timeIndex: -1,
-						noonType:1
-					});
-					let period=res.data[0].period;
-					let list=period.filter(item=>{
-						return item.ofTime=='上午';
-					});
-					this.setData({
-						timeList:list
-					});
+            dateList: res.data,
+            dateIndex: 0,
+            timeIndex: -1,
+            noonType: 1
+          });
+          let period = res.data[0].period;
+          let list = period.filter(item => {
+            return item.ofTime == '上午';
+          });
+          this.setData({
+            timeList: list
+          });
 
 
         } else {
@@ -1580,4 +1555,4 @@ Page({
 
 
 
-});
+});

+ 71 - 60
pages/checkout/checkout.wxml

@@ -1,11 +1,8 @@
 <wxs src="../../utils/formatFuc.wxs" module="formatFuc" />
+<wxs module="filter" src="../../utils/filter.wxs" />
 <view class="container">
   <view class="address-box">
     <view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
-      <!-- <view class="l">
-        <text class="name">{{checkedAddress.name}}</text>
-        <text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text> 
-      </view> -->
       <image class="map-icon" mode="aspectFit" src='/static/images/address/dingwei.png'></image>
       <view class="m">
 
@@ -37,7 +34,6 @@
 		 <!-- 商品详情 -->
 		 <view class="goods-items">
     <view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
-      <!-- <view class="name">{{item.goodsName}}</view> -->
       <view style="display: flex;">
         <view class="img">
           <image src="{{item.picUrl}}" mode="aspectFill"></image>
@@ -60,7 +56,6 @@
 		<view class="plus-name">
 		{{checkedGoodsList[0].product.specifications}}
     <text>x</text>
-		<!-- <text class="plus-num">{{checkedGoodsList[0].unitPrice}}*{{checkedGoodsList[0].unitIncreaseNumber}}</text> -->
 		<text class="plus-num"> {{checkedGoodsList[0].unitIncreaseNumber}}</text>
 		</view>
 		<view class="plus-amount">{{increaseSumPrice}}</view>
@@ -223,10 +218,6 @@
     需支付:<text>¥{{actualPrice}}</text>
   </view>
 
-  <!-- <view class="order-total">
-    <view class="l">实付:¥{{actualPrice}}</view> 
-    <view class="r" bindtap="submitOrder">去付款</view>
-  </view> -->
   <view class="go-pay-wrapper">
 
     <van-button type="info" block round bindtap="submitOrder">去付款</van-button>
@@ -234,86 +225,106 @@
 
   <!-- custom-style="height: 80%" -->
   <van-popup show="{{ choosePopup }}" round position="bottom" bind:click-overlay="onClose">
-    <view class="popup-wrapper  {{popupType==1?'popup-wrapper-special':''}}">
+    <view class="popup-wrapper popup-wrapper-special">
       <!-- 标题 -->
-      <view class="popup-title {{popupType==1?'popup-title-special':''}} {{popupType==1?'popup-title-new':''}}">
-       <view> {{popupType==1?"选择服务开始时间":(popupType==2?'选择服务频次':'选择首次上门时段')}}
+      <view class="popup-title popup-title-special popup-title-new">
+       <view> {{popupType==1?"请选择服务开始时间":(popupType==2?'请选择服务频次':'请选择首次服务日期')}}
 			 </view>
 			 <view wx:if="{{selectTimeValue>=17}}" class="fee-tips">您选的时间段可能会加收夜间服务费,具体以与商家的沟通为准</view>
       </view>
 
       <block wx:if="{{popupType==1}}">
         <view class="popup-content {{popupType==1?'popup-content-special':''}}">
-          <view class="time-select-left">
-            <view wx:for="{{dateList}}" wx:key="index" class="time-select-left-item" bindtap="dateCheck"
-              data-week="{{item.week}}" data-index="{{index}}" data-date="{{item.date}}"  data-isbook="{{item.isBook}}">
-            <view class="date-line-wrapper">
-							<view class="{{dateIndex==index?'current-date':''}}">{{item.bookdate+' '+item.weekOfDay}}</view>
-              <view>
-              
-                <text wx:if="{{index<=1}}" class="date-tag">{{index==0?'今天':'明天'}}</text>
-             
+          <view class="time-select-top" style="display: flex;">
+          <scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
+            <view class="time-select-left-item" bindtap="dateCheck" data-index="{{index}}" data-week="{{item.week}}" data-date="{{item.date}}" data-isbook="{{item.isBook}}" wx:for="{{dateList}}" wx:key="index" style="display: inline-block;">
+              <view class="date-line-wrapper">
+                <view class="date-msg {{dateIndex == index ? 'current-date' : ''}} {{item.dateMsg == '不可约' ? 'avail-date' : ''}}">
+                  {{item.weekOfDay}}
+                </view>
+                <view class="date-msg1 {{dateIndex == index ? 'current-date' : ''}} {{item.dateMsg == '不可约' ? 'avail-date' : ''}}">{{ filter.formatTime(item.bookdate)}}</view>
+                <view class="{{dateIndex == index ? 'current-line' : ''}} {{item.dateMsg == '不可约' ? 'current-line0' : ''}}"></view>
               </view>
-						</view>
-						<view class="date-msg {{item.dateMsg=='可约'?'avail-date':''}}">{{item.dateMsg}}</view>
-
-             
             </view>
+          </scroll-view>
+        </view>
+        <view class="time-select-middle">
+          <view class="noon-select">
+            <view class="noon-item {{noonType=='1'?'active-noon':''}}" data-noon="1" bindtap="noonTab">上午</view>
+            <view class="divider"></view>
+            <view class="noon-item {{noonType=='2'?'active-noon':''}}" data-noon="2" bindtap="noonTab">下午</view>
           </view>
-          <view class="time-select-right">
-						<view class="noon-select" wx:if="{{popupType==1}}">
-               <view class="noon-item {{noonType=='1'?'active-noon':''}}" data-noon="1" bindtap="noonTab">上午</view>
-               <view class="noon-item {{noonType=='2'?'active-noon':''}}" data-noon="2" bindtap="noonTab">下午</view>
-          </view>
+
           <view class="time-item-wrapper">
-            <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item  {{item.timeMsg?'invalid-time':''}}" bindtap="timeCheck"
-            data-stock="{{item.stock}}"
-              data-index="{{index}}" data-msg="{{item.timeMsg}}">
-              <!-- <view class="{{item.stock<=0?'zero-stock':''}}"> -->
-							<view class="time-line">
-              <text class="{{timeIndex===index?'current-date':''}} ">{{item.begin}} </text>
-              <!-- <text class="stock-text">(库存:{{item.stock}})</text> -->
-							<text wx:if="{{selectTimeValue>=17&&timeIndex==index&&(!item.timeMsg)}}" class="extra-tips">收夜间服务费</text>
-							<view wx:if="{{item.timeMsg&&item.timeMsg!=null}}" class="time-msg">
-							{{item.timeMsg}}
-							</view>
-              <view wx:if="{{timeIndex===index}}" class="date-tag">已选</view>
-              </view>
-						
+            <view bindtap="timeCheck" data-stock="{{item.stock}}" data-index="{{index}}" data-msg="{{item.timeMsg}}" data-toastmsg="{{item.toastMsg}}" class="time-msg {{timeIndex == index ? 'current-time' : ''}} {{item.timeMsg == '不可约' ? 'avail-time' : ''}}" wx:for="{{timeList}}" wx:key="index">
+              <view class="{{timeIndex === index ? 'current-time' : ''}}">{{ item.begin }}</view>
+            </view>
+          </view>
+          <view class="appointment-tips">
+            <view> <span></span>
+              <text>可预约</text>
+            </view>
+            <view> <span class="selected"></span>
+              <text>已选择</text>
             </view>
-						</view>
+            <view> <span class="no-appointment"></span>
+              <text>不可约</text>
+            </view>
+          </view>
 
+          <view class="time-select-bottom" wx:if="{{date!=''&&time!=''&&week!=''}}">
+            <span>当前选择:</span>{{date}}({{week}}){{time}}
           </view>
         </view>
+        </view>
       </block>
       <!-- 选择频次 -->
       <block wx:if="{{popupType==2}}">
-        <van-tabs wx:if="{{ choosePopup }}" active="{{ activeTab }}" color="#09afff" bind:change="onTabChange">
+        <van-tabs wx:if="{{ choosePopup }}" active="{{ activeTab }}" color="#09afff" bind:change="onTabChange" >
           <van-tab title="一周1次" name="1"></van-tab>
           <van-tab title="一周2次" name="2"></van-tab>
-          <van-tab title="周1次" name="3"></van-tab>
+          <van-tab title="周1次" name="3"></van-tab>
         </van-tabs>
         <view class="popup-content select-week-times">
           <view class="time-select-left week-select-left">
             <view wx:for="{{weekArrList}}" wx:key="index" class="time-select-left-item " bindtap="weekCheck"
-              data-index="{{index}}" >
+              data-index="{{index}}" 	data-weekday="{{item.week}}" >
 
-              <view class="week-str {{weekIndex==index?'current-date':''}}">{{item.week}}</view>
+              <view class="week-str {{weekIndex==index?'current-date2':''}}">{{item.week}}</view>
               <view class="select-num-tag" wx:if="{{item.num>0}}">{{item.num}}</view>
             </view>
           </view>
-          <view class="time-select-right">
-            <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item" bindtap="timeSelect"
+          <view class="time-select-right  time-select-middle">
+          <view class="time-select-right-a">
+             <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item" bindtap="timeSelect"
               data-index="{{index}}" data-time="{{item.time}}">
-              <!-- <view class="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">{{item.time}}</view>
-         <view  wx:if="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}" class="date-tag">已选</view> -->
               <view
-                class="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">
+                class="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-time':''}}">
                 {{item.time}}</view>
-              <view
-                wx:if="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}"
-                class="date-tag">已选</view>
-            </view>
+            
+            </view> 
+          </view>
+          <view class="appointment-tips appointment-tips1">
+								<view> <span></span>
+									<text>可预约</text>
+								</view>
+								<view> <span class="selected"></span>
+									<text>已选择</text>
+								</view>
+								<view> <span class="no-appointment"></span>
+									<text>不可约</text>
+								</view>
+							</view>
+
+              <view class="time-select-bottom1" wx:if="{{selectweek!=''&selectedDateList.length>0}}">
+								周期卡服务频次,可按照您的习惯选择特定频率上门,后续可修改。
+							</view>
+							<view class="time-select-bottom" wx:if="{{selectweek!=''&selectedDateList.length>0}}">
+								<span>当前选择:</span>
+								{{selectweek}}
+								<span class="selected-time"></span>
+                <text wx:for="{{selectedDateList}}">{{item.weekStr}}({{item.time}})</text>
+							</view>
           </view>
 
         </view>
@@ -329,7 +340,7 @@
             <view class="first-appoint-date-item" wx:for="{{firstAppointList}}" wx:key="index" bindtap="firstDateCheck"
               data-index="{{index}}">
               <view class="{{firstDateIndex==index?'current-date':''}}">{{item.date+' '+item.week}}</view>
-              <view wx:if="{{firstDateIndex==index}}" class="first-time-selected date-tag">已选</view>
+            
             </view>
           </view>
         </view>

+ 475 - 250
pages/checkout/checkout.wxss

@@ -8,10 +8,6 @@ page {
 
 .address-box {
   width: 100%;
-  /* height: 166.55rpx;
-  background-size: 62.5rpx 10.5rpx; */
-  /* margin-bottom: 20rpx; */
-  /* padding-top: 10.5rpx; */
 }
 
 .address-item {
@@ -232,9 +228,7 @@ font-size: 22rpx;
 }
 
 .goods-items {
-  /* margin-top: 20rpx; */
   background: #fff;
-  /* margin-bottom: 120rpx; */
   border-radius: 10rpx;
   padding: 20rpx 12rpx;
 }
@@ -246,7 +240,6 @@ font-size: 22rpx;
 
 .goods-items .item .name{
   font-size: 28rpx;
-  /* height: 28rpx; */
   line-height: 32rpx;
   color: #2a2a2a;
 }
@@ -442,181 +435,6 @@ view.appoint-result{
   font-weight: normal;
   height: 70rpx;
 }
-/* 选择时间 */
-view.popup-wrapper{
-  /* padding: 0 0 20rpx; */
-  color:#333;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 100%;
-	z-index:999;
-	overflow: hidden;
-}
-.popup-wrapper view{
-  color:#888;
-  font-size: 30rpx;
-}
-
-.popup-content{
-  flex:1;
-}
-.popup-title{
-  height: 96rpx;
-  line-height: 96rpx;
-  text-align: center;
-  border-bottom: 1rpx solid #ddd;
-}
-.popup-content{
-  display: flex;
-}
-.time-select-left{
-  /* flex:2; */
-  border-right:1rpx solid #ddd;
-	/* padding:0 20rpx; */
-	padding: 0 8rpx 0 20rpx;
-  width:370rpx;
-
-}
-.time-select-right{
-	flex: 1.6;
-  /* padding: 0 8rpx; */
-  height: 900rpx; 
-  overflow-y: hidden; 
-
-}
-.popup-content-special .time-select-right{
-	flex:1;
-}
-.time-select-left-item{
-  height: 108rpx;
-  display: flex;
-	flex-direction: column;
-	padding:4rpx 0;
-
-}
-.date-line-wrapper{
-	flex:1;
-	display: flex;
-	/* justify-content: space-between; */
-	align-items:center;
-}
-.time-select-left-item .date-msg{
-	height:36rpx;
-	line-height: 36rpx;
-	color: #888;
-	font-size: 24rpx;
-}
-.time-select-left-item .date-msg.avail-date{
-	color:#3FA10D;
-	font-weight: bold;
-}
-.popup-wrapper .popup-content .current-date {
-  color: #09afff;
-  font-weight: bold;
-}
-
-view.popup-wrapper .time-select-right-item{
-  height: 104rpx;
-  border-bottom:1rpx solid #d1d1d1;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding:0 24rpx;
-}
-.time-select-right-item view{
-  color:#6D7278;
-  /* font-weight: bold; */
-}
-view.popup-btn-wrapper{
-  margin:20rpx 0 0;
-  padding:0 24rpx 20rpx;
-}
-view.popup-btn-wrapper button > view{
-  color:#fff;
-}
-view.popup-wrapper .date-tag{
-  color:#09afff;
-  height: 44rpx;
-  line-height: 42rpx;
-  width:76rpx;
-  border:2rpx solid #09afff;
-  border-radius:44rpx;
-  text-align: center;
-  font-weight: normal;
-  font-size: 22rpx;
-	display: inline-block;
-	margin-left:8rpx;
-
-}
-view.popup-wrapper .time-select-right-item.invalid-time text{
-  color: #999;
-}
-view.popup-wrapper .time-select-right-item.invalid-time{
-	/* background: #E1E1E1; */
-	background: #eee;
-}
-.time-select-right-item view.time-msg{
-	height: 40rpx;
-	line-height: 38rpx;
-	border-radius: 40rpx;
-	padding:0 8rpx;
-	font-size: 22rpx;
-	border: 2rpx solid #999;
-	color: #999;
-	font-weight: normal;
-	white-space: nowrap;
-}
-view.popup-wrapper .full-time{
-  color:#09AFFF;
-  font-size: 24rpx;
-  margin:0 0 0 20rpx;
-  height: 44rpx;
-  line-height: 44rpx;
-  float: right;
-  padding-right:40rpx;
-}
-.first-appoint-date-item{
-  height: 108rpx;
-  display: flex;
-  align-items: center;
-  padding:0 0 0 240rpx;
-
-}
-.first-time-selected{
-  margin:0 0 0 60rpx;
-}
-
-.select-week-times{
-  border-top:1rpx solid #ddd;
-}
-.week-select-left{
-  flex:1.2;
-}
-
-.week-select-left>view.time-select-left-item{
-  padding:0 0 0 60rpx;
-  display: flex;
-  align-items: flex-start;
-  justify-content: flex-start;
-  flex-direction: row;
-  padding:10rpx 0 0 60rpx;
-}
-.week-select-left>view.time-select-left-item .week-str{
-  padding:12rpx 0 0 0;
-}
-view.popup-wrapper view.select-num-tag{
-  width:32rpx;
-  height: 32rpx;
-  line-height: 32rpx;
-  background:#09AFFF;
-  border-radius: 34rpx;
-  font-size: 20rpx;
-  color:#fff;
-  text-align: center;
-  margin:0 0 0 6rpx;
-
-}
 
 /* 支付失败弹框 */
 .overlay-wrapper {
@@ -741,22 +559,8 @@ background: linear-gradient(177deg, #F1E3C8 0%, #E6C162 100%);
   color:#DF1717;
   font-size: 24rpx;
 }
-.popup-content-special{
-  position: relative;
-}
-.popup-title-special{
-  position: absolute; 
-  left:0;
-  top:0;
-  right:0;
-  background: #fff;
-}
-.popup-content-special{
-  height:900rpx ;
-	/* margin-top:96rpx; */
-	margin-top: 116rpx;
 
-}
+
 .popup-content-special .time-select-left{
   height: 900rpx;
   overflow-y: scroll;
@@ -815,59 +619,480 @@ background: linear-gradient(177deg, #F1E3C8 0%, #E6C162 100%);
 	font-weight: bold;
 }
 
-.noon-select{
-  height:64rpx;
-  display: flex;
-  border-bottom:1rpx solid #ddd;
-}
-.time-select-right .noon-item{
-  flex:1;
-  text-align: center;
-  line-height: 64rpx;
-  color: #979797;
-  font-size: 26rpx;
-}
-.time-select-right  view.noon-item.active-noon{
+
+
+  /* 时间弹框相关 */
+  view.popup-wrapper{
+    color:#333;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
+    z-index:999;
+    overflow: hidden;
+  }
+  .popup-wrapper view{
+    color:#888;
+    font-size: 30rpx;
+  }
+  
+  .popup-content{
+    flex:1;
+  }
+  .time-select-right{
+    flex: 1.6;
+    height: 900rpx; 
+    overflow-y: hidden; 
+  
+  }
+  .popup-content-special .time-select-right{
+    flex:1;
+  }
+
+  .time-select-left-item .date-msg{
+    height:36rpx;
+    line-height: 36rpx;
+    color: #888;
+    font-size: 24rpx;
+  }
+  .popup-wrapper .popup-content .current-date {
+    color: #09afff;
+    font-weight: bold;
+  }
+  .current-date2{
+    color: #09afff!important;
+
+  }
+
+  .time-select-right-item view{
+    color:#6D7278;
+  }
+  view.popup-btn-wrapper{
+    margin:20rpx 0 0;
+    padding:0 24rpx 20rpx;
+  }
+  view.popup-btn-wrapper button > view{
+    color:#fff;
+  }
+  view.popup-wrapper .date-tag{
+    color:#09afff;
+    height: 44rpx;
+    line-height: 42rpx;
+    width:76rpx;
+    border:2rpx solid #09afff;
+    border-radius:44rpx;
+    text-align: center;
+    font-weight: normal;
+    font-size: 22rpx;
+    display: inline-block;
+    margin-left:8rpx;
+  
+  }
+  view.popup-wrapper .time-select-right-item.invalid-time text{
+    color: #999;
+  }
+  view.popup-wrapper .time-select-right-item.invalid-time{
+    background: #eee;
+  }
+  .time-select-right-item view.time-msg{
+    height: 40rpx;
+    line-height: 38rpx;
+    border-radius: 40rpx;
+    padding:0 8rpx;
+    font-size: 22rpx;
+    border: 2rpx solid #999;
+    color: #999;
+    font-weight: normal;
+    white-space: nowrap;
+  }
+  view.popup-wrapper .full-time{
+    color:#09AFFF;
+    font-size: 24rpx;
+    margin:0 0 0 20rpx;
+    height: 44rpx;
+    line-height: 44rpx;
+    float: right;
+    padding-right:40rpx;
+  }
+  .first-appoint-date-item{
+    height: 108rpx;
+    display: flex;
+    align-items: center;
+    padding:0 0 0 240rpx;
+  
+  }
+  .first-time-selected{
+    margin:0 0 0 60rpx;
+  }
+  .time-select-right-a {
+		padding: 10rpx 24rpx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-content: flex-start;
+	}
+  .week-select-left>view.time-select-left-item .week-str{
+    padding:12rpx 0 0 0;
+  }
+  view.popup-wrapper view.select-num-tag{
+    width:28rpx;
+    height: 28rpx;
+    line-height: 28rpx;
+    background:#09AFFF;
+    border-radius: 28rpx;
+    font-size: 16rpx;
+    color:#fff;
+    text-align: center;
+    margin:0 0 0 6rpx;
+  
+  }
+  .appointment-tips1 {
+		position: absolute;
+		bottom: 120rpx;
+  }
+  .selected-time{
+    display: inline-block;
+    width: 2px;
+    height: 10px;
+    background-color: #09afff;
+    position: relative;
+    top: 1px;
+    margin: 0 5px;
+  }
+  .time-select-bottom1 {
+		width: 100vw;
+		background-color: #EDF8FD;
+		height: 54rpx;
+		font-size: 22rpx !important;
+		color: #09afff !important;
+		line-height: 54rpx;
+		padding-left: 30rpx;
+		position: absolute;
+		bottom: 55rpx;
+	}
+  .popup-content-special{
+    position: relative;
+  }
+  .time-select-right .noon-item{
+    flex:1;
+    text-align: center;
+    line-height: 64rpx;
+    color: #979797;
+    font-size: 26rpx;
+  }
+  .time-select-right  view.noon-item.active-noon{
+    color: #fff;
+    background: #09afff;
+  }
+  view.popup-wrapper .time-select-right-item .date-tag{
+    width: 80rpx;
+  height: 40rpx;
+  line-height: 38rpx;
+  margin-left:0;
+  }
+  
+  .popup-title-new view{
+    color:#333;
+    font-size: 32rpx;
+  }
+  .time-select-right-item  text{
+    color:#888;
+  }
+  .time-select-right .time-item-wrapper{
+    height: 836rpx;
+      overflow-y: scroll;
+  }
+  .time-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width:100%;
+  }
+  .time-select-right-item text.extra-tips{
+    color: #FF5735;
+    font-size: 22rpx;
+  }
+  .popup-content-special{
+    height:900rpx ;
+    /* margin-top: 116rpx; */
+  }
+  .week-select-left {
+		display: flex;
+		justify-content: space-around;
+    text-align: center;
+    padding-left: 20rpx;
+	}
+
+	.popup-wrapper view {
+		color: #888;
+		font-size: 30rpx;
+	}
+
+
+	.appointment-tips {
+		display: flex;
+		justify-content: space-between;
+		width: 178px;
+		position: absolute;
+		bottom: 60rpx;
+		left: calc(50% - 89px);
+	}
+
+	.appointment-tips1 {
+		position: absolute;
+		bottom: 120rpx;
+	}
+
+	.appointment-tips view span {
+		width: 20rpx;
+		height: 20rpx;
+		border-radius: 20rpx;
+		background-color: #EDF8FD;
+		display: inline-block;
+		margin-right: 10rpx;
+	}
+
+	.appointment-tips view .selected {
+		background-color: #09AFFF;
+	}
+
+	.appointment-tips view .no-appointment {
+		background-color: #ccc;
+	}
+
+	.appointment-tips view text {
+		color: #09AFFF;
+		font-size: 24rpx;
+	}
+
+	.time-select-right {
+		flex: 1;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.scroll-view_H {
+		white-space: nowrap;
+		/* 确保子元素在同一行内显示 */
+		overflow-x: scroll;
+		/* 允许横向滚动 */
+	}
+
+	.time-select-left-item {
+		height: 84rpx;
+		display: flex;
+		padding: 4rpx 0;
+		width: 20vw;
+		align-items: center;
+	}
+
+	.date-line-wrapper {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+
+	.time-select-left-item .date-msg {
+		height: 36rpx;
+		line-height: 36rpx;
+		color: #292929;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.time-select-left-item .date-msg1 {
+		/* height: 36rpx; */
+		/* line-height: 36rpx; */
+		color: #292929;
+		font-size: 22rpx;
+    margin-top: 10rpx;
+    margin-bottom: 5rpx;
+
+	}
+
+	.time-select-left-item .date-msg.avail-date {
+		color: #999 !important;
+		font-weight: bold;
+	}
+
+	.time-select-left-item .date-msg1.avail-date {
+		color: #999 !important;
+		font-weight: bold;
+	}
+
+	view.popup-btn-wrapper view {
+		color: #fff;
+	}
+
+	.time-select-middle {
+		background-color: #FCFCFC;
+		padding: 10rpx 0rpx;
+		height: 800rpx;
+		position: relative;
+	}
+
+	.noon-select {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin: 30rpx auto;
+	}
+
+	.noon-select .divider {
+		height: 40rpx;
+		width: 2rpx;
+		background-color: #e5e5e5;
+	}
+
+	.noon-select .noon-item {
+		text-align: center;
+		color: #979797;
+		font-size: 36rpx;
+		width: 49%;
+	}
+
+	.active-noon {
+		text-align: center;
+		color: #09AFFF !important;
+		font-size: 36rpx !important;
+		width: 49%;
+	}
+
+  .popup-title-new.popup-title{
+  padding-top: 30rpx;
+    font-weight: bold;
+    padding-left: 30rpx;
+    height: 120rpx;
+  }
+
+	.popup-title-new view {
+		color: #000;
+		font-size: 40rpx;
+		font-weight: bold;
+	}
+
+	.popup-title-new view.fee-tips {
+		color: #09AFFF;
+		font-size: 22rpx;
+	}
+
+
+	.current-line {
+		width: 38rpx;
+		height: 6rpx;
+		background: #09AFFF;
+		border-radius: 6rpx;
+		margin: auto;
+		opacity: 1;
+	}
+
+	.current-line0 {
+		opacity: 0;
+	}
+
+	.current-time {
+		color: #fff !important;
+		font-family: AlibabaPuHuiTi_2_65_Medium;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #09AFFF;
+		border-radius: 8px;
+		font-size: 36rpx;
+	}
+
+
+	.time-item-wrapper {
+		display: flex;
+		width: 90vw;
+		justify-content: flex-start;
+		flex-wrap: wrap;
+		text-align: center;
+		gap: 20px;
+		margin: 10px auto;
+	}
+
+
+	.time-item-wrapper .time-msg {
+		width: 20%;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #EDF8FD;
+		border-radius: 8px;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.time-item-wrapper .avail-time {
+		width: 20%;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #CCCCCC;
+		border-radius: 8px;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.first-appoint-date-item {
+		height: 108rpx;
+		display: flex;
+		align-items: center;
+		padding: 0 0 0 240rpx;
+		font-family: AlibabaPuHuiTi_2_85_Bold;
+	}
+		.first-appoint-date-item view{
+			font-family: AlibabaPuHuiTi_2_85_Bold;
+		}
+
+	.first-time-selected {
+		margin: 0 0 0 60rpx;
+	}
+
+	.week-str {
+		font-family: AlibabaPuHuiTi_2_85_Bold;
+		font-size: 36rpx !important;
+		color: #C2C2C2 ;
+	}
+
+	.time-select-right-item {
+		width: 45vw;
+		background-color: #EDF8FD;
+		text-align: center;
+		margin-bottom: 28rpx;
+		font-family: AlibabaPuHuiTi_2_65_Medium;
+		line-height: 70rpx;
+		height: 70rpx;
+		border-radius: 8px;
+	}
+.current-time{
   color: #fff;
-  background: #09afff;
-}
-view.popup-wrapper .time-select-right-item .date-tag{
-  width: 80rpx;
-height: 40rpx;
-line-height: 38rpx;
-margin-left:0;
-/* margin-left:120rpx; */
-}
-.popup-title-new.popup-title{
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  height:116rpx;
-  line-height: normal;
-}
-.popup-title-new view{
-  color:#333;
-  font-size: 32rpx;
-}
-.popup-title-new view.fee-tips{
-  color: #FF5735;
-  font-size: 22rpx;
-}
-.time-select-right-item  text{
-  color:#888;
-}
-.time-select-right .time-item-wrapper{
-  height: 836rpx;
-    overflow-y: scroll;
-}
-.time-line{
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width:100%;
+  background-color: #09afff;
+}
+	.time-select-right-a {
+		padding: 20rpx 24rpx 10rpx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-content: flex-start;
+	}
+	.first-appoint-date-list{
+		background-color: #fafafa;
+  }
+  .time-select-bottom {
+		width: 100vw;
+		background-color: #EDF8FD;
+		height: 54rpx;
+		font-size: 22rpx !important;
+		color: #00b4fe !important;
+		line-height: 54rpx;
+		padding-left: 30rpx;
+		position: absolute;
+		bottom: 0;
+  }
+
+.van-tab--active.van-tab>view.van-ellipsis{
+  font-size: 36rpx;
 }
-.time-select-right-item text.extra-tips{
-  color: #FF5735;
-  font-size: 22rpx;
+.van-tab>view.van-ellipsis {
+  font-size: 36rpx;
+  color: #ABABAB;
 }

+ 102 - 135
pages/ucenter/appointOrder/appointOrder.js

@@ -72,7 +72,7 @@ Page({
     choosePopup: false,
     timeList: [],
     // dateList: util.getDateList(new Date(new Date().getTime() + 60 * 60 * 1000 * 24 * 0), 1, 30),
-    dateList:[],
+    dateList: [],
     timeIndex: '',
     //选中的时间段
     dateIndex: 0, //选中的日期
@@ -84,9 +84,13 @@ Page({
     },
     noonType: 1,
     selectTimeValue: '',
-	goodsTip:{
-  remark:null
- }
+    goodsTip: {
+      remark: null
+    },
+    date: '',
+    week: '',
+    time: '',
+
 
   },
   /**
@@ -120,8 +124,8 @@ Page({
         wx.hideLoading();
         console.log(res.data);
         this.setData({
-					orderInfo: res.data,
-					goodsTip:res.data.goodsTip,
+          orderInfo: res.data,
+          goodsTip: res.data.goodsTip,
 
           addressId: res.data.addressId,
           dyDetails: res.data.dyDetails,
@@ -142,6 +146,8 @@ Page({
 
     });
   },
+
+
   getAddressList() {
     util.request(api.AddressList).then(res => {
       if (res.errno === 0) {
@@ -177,11 +183,11 @@ Page({
     }
   },
   getServiceDetail: function () {
-    let that =this;
+    let that = this;
 
-    if(that.data.orderId ==null ||that.data.orderId===undefined){
-        util.showErrorToast('页面已过期,请刷新页面重新查看');
-        return ;
+    if (that.data.orderId == null || that.data.orderId === undefined) {
+      util.showErrorToast('页面已过期,请刷新页面重新查看');
+      return;
     }
     util.request(api.ServiceDetail, {
       order_id: this.data.orderId
@@ -215,45 +221,21 @@ Page({
   },
 
   showAppoint(e) {
-    // let status = e.currentTarget.dataset.status;
-    // if (status == 1) {
-    //   let time = e.currentTarget.dataset.time;
-    //   let str = time.substr(0, 16).replace(/-/g, '/');
-    //   let isNear = new Date(str).getTime() - new Date().getTime() - 2 * 60 * 60 * 1000;
-    //   console.log(isNear);
-    //   if (isNear < 0) {
-    //     wx.showToast({
-    //       title: '服务时间小于2小时,不能修改预约',
-    //       icon: 'none',
-    //       duration: 2000
-    //     });
-    //     return false;
-    //   }
-    // }
-    // if (this.data.order.aftersaleStatus == 1 || this.data.order.aftersaleStatus == 2) {
-    //   util.showErrorToast("退款中,无法预约");
-    //   return;
-    // }
-    //  console.info(this.data.addressName)
-    // if (this.data.addressId == 0||this.data.addressName==null||this.data.addressName=='') {
-    //   util.showErrorToast("请输入服务地址");
-    //   return;
-    // }
-    if(this.data.appointDate!=''){
+    if (this.data.appointDate != '') {
       this.setData({
         choosePopup: true,
       });
       return false;
-    }else{
+    } else {
       this.setData({
         choosePopup: true,
-        noonType:1,
+        noonType: 1,
         timeIndex: 0
       });
       let params = {
-        days:30,
+        days: 30,
         // orderBookId:this.data.bookId,
-        bookId:this.data.serviceId,
+        bookId: this.data.serviceId,
         productId: this.data.orderInfo.productId,
         serviceDuration: this.data.orderInfo.serviceDuration
       }
@@ -266,9 +248,9 @@ Page({
       timeList: timeList,
       selectTimeValue: timeList.length == 0 ? '' : timeList[0].value
     });
-    if(this.data.timeList.length==0){
+    if (this.data.timeList.length == 0) {
       this.setData({
-        timeIndex:''
+        timeIndex: ''
       });
     }
 
@@ -317,7 +299,7 @@ Page({
           timeIndex: ''
         });
       }
-    }).catch(err=> {
+    }).catch(err => {
       console.log(err);
       wx.hideLoading();
       wx.showToast({
@@ -345,19 +327,20 @@ Page({
         wx.hideLoading();
         if (res.errno == 0) {
           this.setData({
-						dateList: res.data,
-						dateIndex:0,
-						timeIndex: -1,
-						noonType:1
+            dateList: res.data,
+            dateIndex: 0,
+            timeIndex: -1,
+            noonType: 1
 
-					});
-					let period=res.data[0].period;
-					let list=period.filter(item=>{
-						return item.ofTime=='上午';
-					});
-					this.setData({
-						timeList:list
-					});
+          });
+          console.log("可选时间列表", this.data.dateList);
+          let period = res.data[0].period;
+          let list = period.filter(item => {
+            return item.ofTime == '上午';
+          });
+          this.setData({
+            timeList: list
+          });
 
 
         } else {
@@ -373,7 +356,7 @@ Page({
           });
         }
 
-      }).catch(err=> {
+      }).catch(err => {
         console.log(err);
         wx.hideLoading();
         wx.showToast({
@@ -393,65 +376,49 @@ Page({
     let week = e.currentTarget.dataset.week;
     let isbook = e.currentTarget.dataset.isbook;
     this.setData({
-			dateIndex: index
-		});
-		let period=this.data.dateList[this.data.dateIndex].period;
-		let current=(this.data.noonType==1?'上午':'下午');
-		let list=period.filter(item=>{
-			return item.ofTime==current;
-		});
-		this.setData({
-			timeList:list
-		});
-		let isNoTime=list.every(item=>{
-       return item.timeMsg&&item.timeMsg!=null;
-		});
-		if(isNoTime){
-			this.setData({
-				timeIndex:-1,
-				selectTimeValue:''
-			});
-		}
-
-    // let dateName = this.data.dateList[this.data.dateIndex].name;
-
-    // this.setData({
-    //   dateIndex: index
-    // });
-
-    // let curDateName = this.data.dateList[this.data.dateIndex].name;
-
-    // if ((curDateName == '今天') || ((new Date()).getHours() >18&&curDateName == "明天")) {
-    //   this.setData({
-    //     noonType: 2
-    //   })
-    // }
-    // this.getTimeList();
-
+      dateIndex: index
+    });
+    let period = this.data.dateList[this.data.dateIndex].period;
+    let current = (this.data.noonType == 1 ? '上午' : '下午');
+    let list = period.filter(item => {
+      return item.ofTime == current;
+    });
+    let bookdate = this.data.dateList[this.data.dateIndex].bookdate
+    let weekOfDay = this.data.dateList[this.data.dateIndex].weekOfDay
+    this.setData({
+      timeList: list,
+      date: bookdate,
+      week: weekOfDay
+    });
+    let isNoTime = list.every(item => {
+      return item.timeMsg && item.timeMsg != null;
+    });
+    if (isNoTime) {
+      this.setData({
+        timeIndex: -1,
+        selectTimeValue: ''
+      });
+    }
 
   },
   timeCheck(e) {
     let index = e.currentTarget.dataset.index;
-    // if (e.currentTarget.dataset.stock == 0) {
-    //   wx.showToast({
-    //     title: '所选时间无库存,请选择其他时间',
-    //     icon: 'none',
-    //     duration: 2000
-    //   });
-    //   return;
-    // }
-    let msg=e.currentTarget.dataset.msg;
-    if (msg==null||msg=='') {
-			let time= (this.data.timeList[index].begin).split(':')[0];
-    this.setData({
-			timeIndex: index,
-			selectTimeValue: Number(time)
-    });
+    let toastMsg = e.currentTarget.dataset.toastmsg;
+    let msg = e.currentTarget.dataset.msg;
+    if (msg == null || msg == '') {
+      let time = (this.data.timeList[index].begin).split(':')[0];
+      let bookTime = this.data.timeList[index].begin + '-' + this.data.timeList[index].end
+      this.setData({
+        timeIndex: index,
+        selectTimeValue: Number(time),
+        time: bookTime
+      });
+    } else {
+      wx.showToast({
+        title: toastMsg,
+        icon: 'none'
+      })
     }
-    // this.setData({
-    //   timeIndex: index,
-    //   selectTimeValue: this.data.timeList[index].value
-    // });
   },
 
   submitBook() { //提交预约
@@ -460,7 +427,7 @@ Page({
       return;
     }
 
-    if (this.data.timeIndex === ''||this.data.timeIndex<0) {
+    if (this.data.timeIndex === '' || this.data.timeIndex < 0) {
       util.showErrorToast("请选择服务时间");
       return false;
     }
@@ -473,16 +440,16 @@ Page({
 
     let date = this.data.dateList[this.data.dateIndex].bookdate;
     let week = this.data.dateList[this.data.dateIndex].weekOfDay;
-    let time = this.data.timeList[this.data.timeIndex].begin+'-'+this.data.timeList[this.data.timeIndex].end;
+    let time = this.data.timeList[this.data.timeIndex].begin + '-' + this.data.timeList[this.data.timeIndex].end;
 
     console.log(date, week, time);
     let params = {
-      detail_id: (this.data.serviceId==null||this.data.serviceId=='undefined'||this.data.serviceId=='') ? this.data.orderId : this.data.serviceId,
+      detail_id: (this.data.serviceId == null || this.data.serviceId == 'undefined' || this.data.serviceId == '') ? this.data.orderId : this.data.serviceId,
       // bookId: this.data.bookId,
       date: date,
       startTime: time.split('-')[0],
       endTime: time.split('-')[1],
-      addressId: (this.data.addressId == 0||this.data.addressId == null) ? this.data.addressIdSave : this.data.checkedAddress.id,
+      addressId: (this.data.addressId == 0 || this.data.addressId == null) ? this.data.addressIdSave : this.data.checkedAddress.id,
       // orderId: this.data.orderId,
       remark: this.data.remark + this.data.message
     };
@@ -520,13 +487,13 @@ Page({
 
   },
   confirmTime() {
-    if (this.data.timeIndex === ''||this.data.timeIndex<0) {
+    if (this.data.timeIndex === '' || this.data.timeIndex < 0) {
       util.showErrorToast('请选择服务时间');
       return false;
     }
     let date = this.data.dateList[this.data.dateIndex].bookdate;
-		let week = this.data.dateList[this.data.dateIndex].weekOfDay;
-		let time = this.data.timeList[this.data.timeIndex].begin+'-'+this.data.timeList[this.data.timeIndex].end;
+    let week = this.data.dateList[this.data.dateIndex].weekOfDay;
+    let time = this.data.timeList[this.data.timeIndex].begin + '-' + this.data.timeList[this.data.timeIndex].end;
     this.setData({
       choosePopup: false,
       appointDate: date + ' ' + week + ' ' + time
@@ -661,7 +628,7 @@ Page({
     });
   },
   submitAll() {
-    if ((this.data.addressId == ''||this.data.addressId == null) && this.data.addressIdSave == '') {
+    if ((this.data.addressId == '' || this.data.addressId == null) && this.data.addressIdSave == '') {
       this.saveAddress();
     } else {
       this.submitBook();
@@ -815,7 +782,7 @@ Page({
     });
   },
   getAreaCode() {
-    let param ={
+    let param = {
       location: this.data.address.lng + ',' + this.data.address.lat,
       extensions: 'all',
       key: api.gdKey,
@@ -835,13 +802,13 @@ Page({
             // let ad_info = res.data.result.ad_info;
             // let areaCode = res.data.result.ad_info.adcode;
             let regeocode = res.data.regeocode.addressComponent;
-            let cityName=(regeocode.city==null||regeocode.city.length==0)?regeocode.province:regeocode.city;
-            let district= (regeocode.district==null||regeocode.district.length==0)?'':regeocode.district;
+            let cityName = (regeocode.city == null || regeocode.city.length == 0) ? regeocode.province : regeocode.city;
+            let district = (regeocode.district == null || regeocode.district.length == 0) ? '' : regeocode.district;
             this.setData({
               ['address.areaCode']: regeocode.adcode,
-              ['address.province']:regeocode.province,
+              ['address.province']: regeocode.province,
               ['address.city']: cityName,
-              ['address.county']:district,
+              ['address.county']: district,
               // ['address.addressname']:res.data.result.address
             });
           } else {
@@ -871,20 +838,20 @@ Page({
     });
   },
   noonTab(e) {
-    let noon=e.currentTarget.dataset.noon;
+    let noon = e.currentTarget.dataset.noon;
 
     this.setData({
       timeIndex: -1,
-			noonType: noon,
-			selectTimeValue:'',
-		});
-		let period=this.data.dateList[this.data.dateIndex].period;
-		let current=(this.data.noonType==1?'上午':'下午');
-		let list=period.filter(item=>{
-			return item.ofTime==current;
-		});
-		this.setData({
-			timeList:list
-		});
+      noonType: noon,
+      selectTimeValue: '',
+    });
+    let period = this.data.dateList[this.data.dateIndex].period;
+    let current = (this.data.noonType == 1 ? '上午' : '下午');
+    let list = period.filter(item => {
+      return item.ofTime == current;
+    });
+    this.setData({
+      timeList: list
+    });
   }
-});
+});

+ 63 - 67
pages/ucenter/appointOrder/appointOrder.wxml

@@ -1,3 +1,4 @@
+<wxs module="filter" src="../../../utils/filter.wxs" />
 <view class="container">
   <!-- 地址 -->
   <view class="order-address">
@@ -29,33 +30,28 @@
             <view wx:else class="input"> {{address.addressname}}</view>
             <!-- <input class="input" value="{{address.addressname}}" disabled="true" placeholder="选择省、市、县(区)、乡(镇)"  placeholder-style="color: #ACADB1;;font-size:24rpx;"/> -->
 
-            <image src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-address-map.png"
-              style="width: 28rpx;height: 28rpx;margin:28rpx 0 0 10rpx;"></image>
+            <image src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-address-map.png" style="width: 28rpx;height: 28rpx;margin:28rpx 0 0 10rpx;"></image>
           </view>
         </view>
         <view class="form-item">
           <view class="label"><text>*</text>小区门牌</view>
           <view class="content">
-            <input class="input" bindinput="bindinputAddress" value="{{address.detail}}"
-              placeholder="详细地址,例xx小区x号楼x单元xx室" placeholder-style="color: #ACADB1;;font-size:24rpx;" />
+            <input class="input" bindinput="bindinputAddress" value="{{address.detail}}" placeholder="详细地址,例xx小区x号楼x单元xx室" placeholder-style="color: #ACADB1;;font-size:24rpx;" />
           </view>
         </view>
         <view class="form-item">
           <view class="label"><text>*</text>联系人</view>
           <view class="content special-content">
-            <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus
-              placeholder-style="color: #ACADB1;;font-size:24rpx;" />
+            <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus placeholder-style="color: #ACADB1;;font-size:24rpx;" />
             <view class="gender-wrapper">
               <view class="female" bindtap="femaleSelect">
-                <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-select-popup.png" mode="asceptFit"
-                  wx:if="{{gender==2}}"></image>
+                <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-select-popup.png" mode="asceptFit" wx:if="{{gender==2}}"></image>
                 <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-unselect-popup.png" mode="asceptFit" wx:else>
                 </image>
                 <text>女士</text>
               </view>
               <view class="male" bindtap="maleSelect">
-                <image src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-select-popup.png" mode="asceptFit"
-                  wx:if="{{gender==1}}"></image>
+                <image src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-select-popup.png" mode="asceptFit" wx:if="{{gender==1}}"></image>
                 <image src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-unselect-popup.png" mode="asceptFit" wx:else>
                 </image>
                 <text>先生</text>
@@ -69,8 +65,7 @@
         <view class="form-item">
           <view class="label"><text>*</text>联系电话</view>
           <view class="content">
-            <input class="input" bindinput="bindinputMobile" value="{{address.tel}}" type="number" placeholder="手机号码"
-              maxlength="11" placeholder-style="color: #ACADB1;;font-size:24rpx;" />
+            <input class="input" bindinput="bindinputMobile" value="{{address.tel}}" type="number" placeholder="手机号码" maxlength="11" placeholder-style="color: #ACADB1;;font-size:24rpx;" />
           </view>
         </view>
 
@@ -83,8 +78,8 @@
     </view>
 
   </view>
- 
-	<!-- <view style="color:red;font-size:24rpx;margin-top:20rpx;">临近春节,服务力紧张,我们会尽量为您安排。如果不能准时服务,支持全额退款</view> -->
+
+  <!-- <view style="color:red;font-size:24rpx;margin-top:20rpx;">临近春节,服务力紧张,我们会尽量为您安排。如果不能准时服务,支持全额退款</view> -->
 
   <!-- 预约服务时间 -->
   <view class="appoint-main-module">
@@ -103,8 +98,7 @@
     <view class="appoint-block">
       <view class="title">补充信息</view>
 
-      <input placeholder="请输入补充信息" class="appoint-timed" value="{{message}}"
-        placeholder-style="font-size:24rpx;color: #ACADB1;" bindinput="bindMessageInput" />
+      <input placeholder="请输入补充信息" class="appoint-timed" value="{{message}}" placeholder-style="font-size:24rpx;color: #ACADB1;" bindinput="bindMessageInput" />
       <image src="https://mall.zhaijieshi.cc/file/wx-dy/arrow-grey.png" mode="aspectFit" class="arrow-img"></image>
     </view>
   </view>
@@ -149,12 +143,13 @@
 
   </view>
 
-	  <!-- 服务须知 -->
-		<view wx:if="{{goodsTip.remark!=null}}" class="notice-block">
-     <view class="notice-title">{{goodsTip.title}}</view> 
-     <view class="notice-item" wx:for="{{goodsTip.remark}}" wx:key="index">
-       <view class="notice-index">{{index+1}}.</view> 
-       <view>{{item}}</view></view>
+  <!-- 服务须知 -->
+  <view wx:if="{{goodsTip.remark!=null}}" class="notice-block">
+    <view class="notice-title">{{goodsTip.title}}</view>
+    <view class="notice-item" wx:for="{{goodsTip.remark}}" wx:key="index">
+      <view class="notice-index">{{index+1}}.</view>
+      <view>{{item}}</view>
+    </view>
   </view>
 
   <!-- 订单信息 -->
@@ -166,8 +161,7 @@
       <view>
         {{orderInfo.orderSn}}
       </view>
-      <image mode="aspectFit" class="copy-img" src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-order-copy.png"
-        bindtap="copyOrder"></image>
+      <image mode="aspectFit" class="copy-img" src="https://mall.zhaijieshi.cc/file/jzmall-dy/icon-order-copy.png" bindtap="copyOrder"></image>
     </view>
     <view class="order-top">
       <view class="topic">
@@ -220,8 +214,7 @@
     <view class="title">
       订单备注
     </view>
-    <textarea bindinput="bindMessageInput" placeholder="请输入订单备注信息" value="{{message}}"
-      placeholder-style="font-size:26rpx;color:#666;" maxlength="200" class="remark-textarea"></textarea>
+    <textarea bindinput="bindMessageInput" placeholder="请输入订单备注信息" value="{{message}}" placeholder-style="font-size:26rpx;color:#666;" maxlength="200" class="remark-textarea"></textarea>
     <view class="btn" bindtap="confirmRemark">
       确定
     </view>
@@ -233,49 +226,57 @@
   <view class="popup-wrapper popup-wrapper-special" wx:if="{{ choosePopup }}">
     <!-- 标题 -->
     <view class="popup-title popup-title-special popup-title-new">
-     <view>选择服务开始时间</view> 
-     <view wx:if="{{selectTimeValue>=17}}" class="fee-tips">您选的时间段可能会加收夜间服务费,具体以与商家的沟通为准</view>
-      <!-- 选择服务者上门时段(具体服务时长以实际服务为准) -->
+      <view>选择服务开始时间</view>
+      <view wx:if="{{selectTimeValue>=17}}" class="fee-tips">您选的时间段可能会加收夜间服务费,具体以与商家的沟通为准</view>
     </view>
 
     <block>
       <view class="popup-content popup-content-special">
-        <view class="time-select-left">
-          <view wx:for="{{dateList}}" wx:key="index" class="time-select-left-item" bindtap="dateCheck"
-            data-index="{{index}}" data-week="{{item.week}}" data-date="{{item.date}}" data-isbook="{{item.isBook}}">
-						<view class="date-line-wrapper">
-            <view class="{{dateIndex==index?'current-date':''}}">{{item.bookdate+' '+item.weekOfDay}}</view>
-            <view>
-              <text wx:if="{{index<=1}}" class="date-tag">{{index==0?'今天':'明天'}}</text>
-            
+
+        <view class="time-select-top" style="display: flex;">
+          <scroll-view class="scroll-view_H" scroll-x="true" scroll-left="0">
+            <view class="time-select-left-item" bindtap="dateCheck" data-index="{{index}}" data-week="{{item.week}}" data-date="{{item.date}}" data-isbook="{{item.isBook}}" wx:for="{{dateList}}" wx:key="index" style="display: inline-block;">
+              <view class="date-line-wrapper">
+                <view class="date-msg {{dateIndex == index ? 'current-date' : ''}} {{item.dateMsg == '不可约' ? 'avail-date' : ''}}">
+                  {{item.weekOfDay}}
+                </view>
+
+                <view class="date-msg1 {{dateIndex == index ? 'current-date' : ''}} {{item.dateMsg == '不可约' ? 'avail-date' : ''}}"> {{ filter.formatTime(item.bookdate)}}</view>
+                <view class=" {{dateIndex == index ? 'current-line' : ''}} {{item.dateMsg == '不可约' ? 'current-line0' : ''}}"></view>
+
+              </view>
             </view>
-					</view>
-						<view class="date-msg {{item.dateMsg=='可约'?'avail-date':''}}">{{item.dateMsg}}</view>
-           
-          </view>
+          </scroll-view>
         </view>
-        <view class="time-select-right">
+        <view class="time-select-middle">
           <view class="noon-select">
-               <view class="noon-item {{noonType=='1'?'active-noon':''}}" data-noon="1" bindtap="noonTab">上午</view>
-               <view class="noon-item {{noonType=='2'?'active-noon':''}}" data-noon="2" bindtap="noonTab">下午</view>
+            <view class="noon-item {{noonType=='1'?'active-noon':''}}" data-noon="1" bindtap="noonTab">上午</view>
+            <view class="noon-item {{noonType=='2'?'active-noon':''}}" data-noon="2" bindtap="noonTab">下午</view>
           </view>
+
           <view class="time-item-wrapper">
-          <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item {{item.timeMsg?'invalid-time':''}}" bindtap="timeCheck"
-            data-stock="{{item.stock}}" data-index="{{index}}" data-msg="{{item.timeMsg}}">
-            <!-- <view class="{{item.stock<=0?'zero-stock':''}}"> -->
-            <view class="time-line">
-              <text class="{{timeIndex===index?'current-date':''}}">{{item.begin}} </text>
-              <!-- <text class="stock-text">(库存:{{item.stock}})</text> -->
-              <text wx:if="{{selectTimeValue>=17&&timeIndex==index&&(!item.timeMsg)}}" class="extra-tips">收夜间服务费</text>
-              <text wx:if="{{timeIndex===index}}" class="date-tag">已选</text>
-              <view wx:if="{{item.timeMsg&&item.timeMsg!=null}}" class="time-msg">
-                {{item.timeMsg}}
-                </view>
+            <view bindtap="timeCheck" data-stock="{{item.stock}}" data-index="{{index}}" data-msg="{{item.timeMsg}}" data-toastmsg="{{item.toastMsg}}" class="time-msg {{timeIndex == index ? 'current-time' : ''}} {{item.timeMsg == '不可约' ? 'avail-time' : ''}}" wx:for="{{timeList}}" wx:key="index">
+              <view class="{{timeIndex === index ? 'current-time' : ''}}">{{ item.begin }}</view>
+
+
 
             </view>
-            <!-- <view wx:if="{{timeIndex===index&&item.value>=17}}" style="font-size: 11px;line-height: 12px;">您选的时间段可能会加收夜间服务费,具体以与商家的沟通为准</view> -->
           </view>
-        </view>
+          <view class="appointment-tips">
+            <view> <span></span>
+              <text>可预约</text>
+            </view>
+            <view> <span class="selected"></span>
+              <text>已选择</text>
+            </view>
+            <view> <span class="no-appointment"></span>
+              <text>不可约</text>
+            </view>
+          </view>
+
+          <view class="time-select-bottom" wx:if="{{date!=''&&time!=''&&week!=''}}">
+            <span>当前选择:</span>{{date}}({{week}}){{time}}
+          </view>
         </view>
       </view>
     </block>
@@ -298,10 +299,8 @@
         选择地址
       </view>
       <view class="address-list">
-        <view class="address-item" wx:for="{{addressList}}" wx:key="index" data-address="{{item}}"
-          bindtap="addressConfirm">
-          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-order-map.png"
-            class="map-img"></image>
+        <view class="address-item" wx:for="{{addressList}}" wx:key="index" data-address="{{item}}" bindtap="addressConfirm">
+          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-order-map.png" class="map-img"></image>
 
           <view class="address-main">
             <view class="main-line">
@@ -327,13 +326,10 @@
         选择备注
       </view>
       <view class="remark-list">
-        <view class="remark-item" wx:for="{{remarkList}}" wx:key="index" data-remark="{{item}}"
-          catchtap="remarkItemSelect">
+        <view class="remark-item" wx:for="{{remarkList}}" wx:key="index" data-remark="{{item}}" catchtap="remarkItemSelect">
           <view class="remark-value">{{item}}</view>
-          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-select-popup.png"
-            class="radio-img" wx:if="{{remarkActive==item}}"></image>
-          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-unselect-popup.png"
-            class="radio-img" wx:else></image>
+          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-select-popup.png" class="radio-img" wx:if="{{remarkActive==item}}"></image>
+          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-unselect-popup.png" class="radio-img" wx:else></image>
         </view>
       </view>
       <view class="remark-conf-btn" catchtap="remarkItemConfirm">提交备注</view>

+ 325 - 40
pages/ucenter/appointOrder/appointOrder.wxss

@@ -361,20 +361,20 @@
     flex: 1;
   }
   
-  .popup-title {
+  /* .popup-title {
     height: 96rpx;
     line-height: 96rpx;
     text-align: center;
     border-bottom: 1rpx solid #ddd;
     font-size: 15px !important;
-  }
+  } */
   
-  .popup-content {
+  /* .popup-content {
     display: flex;
   }
   
   .time-select-left {
-    /* flex: 2; */
+
     border-right: 1rpx solid #ddd;
     padding: 0 8rpx 0 20rpx;
     width:370rpx;
@@ -382,7 +382,7 @@
   
   .time-select-right {
     flex: 1;
-    /* padding: 0 8rpx; */
+
     height: 900rpx; 
     overflow-y: hidden; 
   }
@@ -397,7 +397,7 @@
 	.date-line-wrapper{
 		flex:1;
 		display: flex;
-		/* justify-content: space-between; */
+	
 		align-items:center;
 	}
 	.time-select-left-item .date-msg{
@@ -421,7 +421,7 @@
     border-bottom: 1rpx solid #ddd;
     display: flex;
     align-items: flex-start;
-    /*justify-content: space-between; */
+   
     flex-direction: column;
     padding: 0 24rpx;
     justify-content: center;
@@ -429,8 +429,8 @@
   
   .time-select-right-item view {
     color: #6D7278;
-    /* font-weight: bold; */
-  }
+  
+  } */
   
   view.popup-btn-wrapper {
     margin: 20rpx 0 0;
@@ -441,7 +441,7 @@
     color: #fff;
   }
   
-  view.popup-wrapper .date-tag {
+  /* view.popup-wrapper .date-tag {
     color: #09afff;
     height: 44rpx;
     line-height: 42rpx;
@@ -475,13 +475,13 @@
   
   .first-time-selected {
     margin: 0 0 0 60rpx;
-  }
+  } */
   
   .select-week-times {
     border-top: 1rpx solid #ddd;
   }
   
-  .week-select-left {
+  /* .week-select-left {
     flex: 1.2;
   }
   
@@ -497,8 +497,8 @@
   .week-select-left>view.time-select-left-item .week-str {
     padding: 12rpx 0 0 0;
   }
-  
-  view.popup-wrapper view.select-num-tag {
+   */
+  /* view.popup-wrapper view.select-num-tag {
     width: 32rpx;
     height: 32rpx;
     line-height: 32rpx;
@@ -509,23 +509,18 @@
     text-align: center;
     margin: 0 0 0 6rpx;
   
-  }
+  } */
   
-  .popup-content-special {
+  /* .popup-content-special {
     position: relative;
-  }
-  
+  } */
+/*   
   .popup-title-special {
     position: absolute;
-    left: 0;
-    top: 0;
-    right: 0;
-    background: #fff;
-  }
+  } */
   
-  .popup-content-special {
+  /* .popup-content-special {
     height: 900rpx;
-    /* margin-top: 96rpx; */
     margin-top: 116rpx;
   }
   
@@ -533,7 +528,7 @@
     height: 900rpx;
     overflow-y: scroll;
   }
-  
+   */
   .stock-text {
     font-size: 20rpx;
     font-weight: normal;
@@ -934,22 +929,22 @@
     color: #ACADB1;
     font-size: 24rpx;
   }
-  .noon-select{
+  /* .noon-select{
     height:64rpx;
     display: flex;
     border-bottom:1rpx solid #ddd;
-  }
-  .time-select-right .noon-item{
+  } */
+  /* .time-select-right .noon-item{
     flex:1;
     text-align: center;
     line-height: 64rpx;
     color: #979797;
     font-size: 26rpx;
-  }
-  .time-select-right  view.noon-item.active-noon{
+  } */
+  /* .time-select-right  view.noon-item.active-noon{
     color: #fff;
     background: #09afff;
-  }
+  } */
   view.popup-wrapper .time-select-right-item .date-tag{
     width: 80rpx;
   height: 40rpx;
@@ -960,10 +955,13 @@
   .popup-title-new.popup-title{
     display: flex;
     flex-direction: column;
-    justify-content: center;
+    font-weight: bold;
+    padding: 30rpx;
+    font-size: 40rpx;
+    /* justify-content: center;
     align-items: center;
     height:116rpx;
-    line-height: normal;
+    line-height: normal; */
   }
   .popup-title-new view{
     color:#333;
@@ -986,14 +984,14 @@
     justify-content: space-between;
     width:100%;
   }
-  view.popup-wrapper .time-select-right-item.invalid-time text{
+  /* view.popup-wrapper .time-select-right-item.invalid-time text{
     color: #999;
   }
   view.popup-wrapper .time-select-right-item.invalid-time{
-      /* background: #E1E1E1; */
+
       background: #eee;
-  }
-  .time-select-right-item view.time-msg{
+  } */
+  /* .time-select-right-item view.time-msg{
       height: 40rpx;
       line-height: 38rpx;
       border-radius: 40rpx;
@@ -1003,7 +1001,7 @@
       color: #999;
       font-weight: normal;
       white-space: nowrap;
-  }
+  } */
   .time-select-right-item text.extra-tips{
     color: #FF5735;
     font-size: 22rpx;
@@ -1034,5 +1032,292 @@
 	.notice-item view:last-child{
 		flex:1;
 		text-align: justify;
+  }
+  
+  /* 时间弹框相关 */
+  .week-select-left {
+		display: flex;
+		justify-content: space-around;
+		text-align: center;
+	}
+
+	.popup-wrapper view {
+		color: #888;
+		font-size: 30rpx;
+	}
+
+	.popup-content {
+		flex: 1;
+	}
+
+
+	.appointment-tips {
+		display: flex;
+		justify-content: space-between;
+		width: 178px;
+		position: absolute;
+		bottom: 60rpx;
+		left: calc(50% - 89px);
+	}
+
+	.appointment-tips1 {
+		position: absolute;
+		bottom: 120rpx;
+	}
+
+	.appointment-tips view span {
+		width: 20rpx;
+		height: 20rpx;
+		border-radius: 20rpx;
+		background-color: #EDF8FD;
+		display: inline-block;
+		margin-right: 10rpx;
+	}
+
+	.appointment-tips view .selected {
+		background-color: #09AFFF;
+	}
+
+	.appointment-tips view .no-appointment {
+		background-color: #ccc;
+	}
+
+	.appointment-tips view text {
+		color: #09AFFF;
+		font-size: 24rpx;
+	}
+	.time-select-left {
+		padding: 0 8rpx 0 20rpx;
+		width: 370rpx;
+	}
+
+	.time-select-right {
+		flex: 1;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.scroll-view_H {
+		white-space: nowrap;
+		/* 确保子元素在同一行内显示 */
+		overflow-x: scroll;
+		/* 允许横向滚动 */
+	}
+
+	.time-select-left-item {
+		height: 84rpx;
+		display: flex;
+		flex-direction: column;
+		padding: 4rpx 0;
+		width: 20vw;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.date-line-wrapper {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+
+	.time-select-left-item .date-msg {
+		height: 36rpx;
+		line-height: 36rpx;
+		color: #292929;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.time-select-left-item .date-msg1 {
+		color: #292929;
+		font-size: 22rpx;
+		margin-top: 10rpx;
+margin-bottom: 6rpx;
+	}
+
+	.time-select-left-item .date-msg.avail-date {
+		color: #999 !important;
+		font-weight: bold;
+	}
+
+	.time-select-left-item .date-msg1.avail-date {
+		color: #999 !important;
+		font-weight: bold;
+	}
+
+	.popup-wrapper .popup-content .current-date {
+		color: #09AFFF !important;
+
+	}
+
+
+
+	view.popup-btn-wrapper view {
+		color: #fff;
+	}
+
+	.time-select-middle {
+		background-color: #FCFCFC;
+		padding: 10rpx 0rpx;
+		height: 800rpx;
+		position: relative;
+	}
+
+	.noon-select {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin: 30rpx auto;
+	}
+
+	.noon-select .divider {
+		height: 40rpx;
+		width: 2rpx;
+		background-color: #e5e5e5;
+	}
+
+	.noon-select .noon-item {
+		text-align: center;
+		color: #979797;
+		font-size: 36rpx;
+		width: 49%;
+	}
+
+	.active-noon {
+		text-align: center;
+		color: #09AFFF !important;
+		font-size: 36rpx !important;
+		width: 49%;
+	}
+
+	.popup-title-new.popup-title {
+		display: flex;
+		flex-direction: column;
+		font-size: 20px;
+		font-weight: bold;
+		text-align: left;
+		padding: 30rpx;
+
+	}
+
+	.popup-title-new view {
+		color: #000;
+		font-size: 40rpx;
+		font-weight: bold;
+	}
+
+	.popup-title-new view.fee-tips {
+		color: #09AFFF;
+		font-size: 22rpx;
+	}
+
+
+	.current-line {
+		width: 38rpx;
+		height: 6rpx;
+		background: #09AFFF;
+		border-radius: 6rpx;
+		margin: auto;
+		opacity: 1;
+	}
+
+	.current-line0 {
+		opacity: 0;
+	}
+
+	.current-time {
+		color: #fff !important;
+		font-family: AlibabaPuHuiTi_2_65_Medium;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #09AFFF;
+		border-radius: 8px;
+		font-size: 36rpx;
+	}
+
+
+	.time-item-wrapper {
+		display: flex;
+		width: 90vw;
+		justify-content: flex-start;
+		flex-wrap: wrap;
+		text-align: center;
+		gap: 20px;
+		margin: 10px auto;
+	}
+
+
+	.time-item-wrapper .time-msg {
+		width: 20%;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #EDF8FD;
+		border-radius: 8px;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.time-item-wrapper .avail-time {
+		width: 20%;
+		line-height: 70rpx;
+		height: 70rpx;
+		background-color: #CCCCCC;
+		border-radius: 8px;
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+
+	.first-appoint-date-item {
+		height: 108rpx;
+		display: flex;
+		align-items: center;
+		padding: 0 0 0 240rpx;
+		font-family: AlibabaPuHuiTi_2_85_Bold;
+	}
+		.first-appoint-date-item view{
+			font-family: AlibabaPuHuiTi_2_85_Bold;
+		}
+
+	.first-time-selected {
+		margin: 0 0 0 60rpx;
+	}
+
+	.week-str {
+		font-family: AlibabaPuHuiTi_2_85_Bold;
+		font-size: 36rpx !important;
+		color: #C2C2C2 !important;
+	}
+
+	.time-select-right-item {
+		width: 45vw;
+		background-color: #feebd7;
+		text-align: center;
+		margin-bottom: 28rpx;
+		font-family: AlibabaPuHuiTi_2_65_Medium;
+		line-height: 70rpx;
+		height: 70rpx;
+		border-radius: 8px;
+	}
+
+	.time-select-right-a {
+		padding: 10rpx 24rpx;
+
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-content: flex-start;
 	}
-		
+	.first-appoint-date-list{
+		background-color: #fafafa;
+  }
+  .time-select-bottom {
+		width: 100vw;
+		background-color: #EDF8FD;
+		height: 54rpx;
+		font-size: 22rpx !important;
+		color: #00b4fe !important;
+		line-height: 54rpx;
+		padding-left: 30rpx;
+		position: absolute;
+		bottom: 0;
+	}

+ 11 - 0
utils/filter.wxs

@@ -0,0 +1,11 @@
+
+
+
+  // filter.wxs
+var formatTime = function (data) {
+  return data.substring(0, 10).split('-').slice(1).join('-');
+ 
+}
+module.exports = {
+  formatTime: formatTime
+};