Commit 022c8cac authored by zhengke's avatar zhengke

修改

parent 42997b7c
...@@ -98,12 +98,12 @@ ...@@ -98,12 +98,12 @@
<view class="date-box flex" @click="showTimePopup=true"> <view class="date-box flex" @click="showTimePopup=true">
<view class="date"> <view class="date">
<text>{{roomMsg.StartDate}}</text> <text>{{roomMsg.StartDate}}</text>
<text class="date-week">{{searchObj.date.startWeek}}</text> <text class="date-week">{{startWeek}}</text>
</view> </view>
<view class="hr-line"></view> <view class="hr-line"></view>
<view class="date"> <view class="date">
<text>{{roomMsg.EndDate}}</text> <text>{{roomMsg.EndDate}}</text>
<text class="date-week">{{searchObj.date.endWeek}}</text> <text class="date-week">{{endWeek}}</text>
</view> </view>
<view class="ver-line"></view> <view class="ver-line"></view>
<view class="date"> <view class="date">
...@@ -221,6 +221,8 @@ ...@@ -221,6 +221,8 @@
StartDate:'', StartDate:'',
EndDate:'' EndDate:''
}, },
startWeek:'',
endWeek:'',
day:0, day:0,
threeLevelList: [{ threeLevelList: [{
name: "单人床", name: "单人床",
...@@ -285,7 +287,8 @@ ...@@ -285,7 +287,8 @@
this.roomMsg.StartDate = tempDay.StartDate; this.roomMsg.StartDate = tempDay.StartDate;
this.roomMsg.EndDate = tempDay.EndDate; this.roomMsg.EndDate = tempDay.EndDate;
this.day = tempDay.day; this.day = tempDay.day;
console.log(options.dayObj); this.startWeek = tempDay.startWeek;
this.endWeek = tempDay.endWeek;
} }
}, },
methods: { methods: {
...@@ -315,8 +318,15 @@ ...@@ -315,8 +318,15 @@
url: "/pages/hotel/description" url: "/pages/hotel/description"
}) })
}, },
//返回周几
getWeek(date){
console.log(date,'date');
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
return '周'+week;
},
chosenDateResult(obj) { chosenDateResult(obj) {
console.log(obj,'objjjj');
obj.startDay = this.formatMonthDay(obj.startDay) obj.startDay = this.formatMonthDay(obj.startDay)
obj.endDay = this.formatMonthDay(obj.endDay) obj.endDay = this.formatMonthDay(obj.endDay)
this.searchObj.date = obj this.searchObj.date = obj
......
...@@ -226,11 +226,14 @@ ...@@ -226,11 +226,14 @@
this.getList(1); this.getList(1);
}, },
chosenDateResult(obj) { chosenDateResult(obj) {
console.log(obj,'obj');
this.searchObj.QStartDate = obj.start; this.searchObj.QStartDate = obj.start;
this.searchObj.QEndDate = obj.end; this.searchObj.QEndDate = obj.end;
this.startDay = obj.startDay; this.startDay = obj.startDay;
this.endDay = obj.endDay; this.endDay = obj.endDay;
this.day = obj.day; this.day = obj.day;
this.dayObj.startWeek = obj.startWeek;
this.dayObj.endWeek = obj.endWeek;
this.getList(1); this.getList(1);
this.showTimePopup = false this.showTimePopup = false
}, },
......
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