Commit 287d14aa by zhangzhen

细节优化

parent fa1045ae
......@@ -131,7 +131,7 @@
box-shadow: 0 4upx 8upx rgba(0, 0, 0, 0.1);
border-radius: 12upx;
overflow: hidden;
// margin-top: 24upx;
margin-top: 24upx;
padding: 20upx 0;
.room-img-box {
......
......@@ -27,7 +27,7 @@
</view>
</view>
</view>
<view v-if="userInfo.memberConfig && userInfo.memberConfig.memberType ==1" class="tip-date">
<view v-if="userInfo.memberConfig && ( userInfo.memberConfig.memberType ==1 || userInfo.memberConfig.memberType ==2) " class="tip-date">
<text>{{userInfo.consumerMember.expirationDate}}到期</text>
</view>
</view>
......
......@@ -61,9 +61,20 @@
</view>
<view v-for="(item,k) in dateList" :key="k" class="flex-1 flex-col date-item"
:class="{active:dateIndex === k}" @tap="onDateChange(k)">
<text
class="text-title text-bold text-first ">{{ k === 0 && item.readDate === toDayDate? '今天' : item.weekday}}</text>
<view class="relative">
<text class="text-title text-bold text-first ">{{ k === 0 && item.readDate === toDayDate? '今天' : item.weekday}}</text>
<view v-if="dateIndex !== k && activityDate[item.readDate]" class="absolute-right">
<image :src="assetsPath+'/xx2.png'" mode="widthFix"></image>
</view>
</view>
<text class="text-title text-bold" style="margin-top: 12upx;">{{ item.date}}</text>
<view v-if="dateIndex === k && activityDate[item.readDate]" class="absolute-right">
<image :src="assetsPath+'/xx2.png'" mode="widthFix"></image>
</view>
</view>
</view>
</view>
......@@ -80,7 +91,7 @@
<view class="item" :class="allDayUseStatus? 'gray': modeIndex===index?'active':''">
<text>{{item.labelName}}</text>
</view>
<view v-if="item.openPack==1" class="pre-icon">
<view v-if="item.openPack==1 || (activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId))" class="pre-icon">
<image :src="assetsPath+'/pre_icon.png'" mode="widthFix"></image>
</view>
</view>
......@@ -96,40 +107,8 @@
</view>
</view>
</view>
</view>
<!-- <view v-if="orderType ===1 && !roomLabelList.length && !packageMode.length"
class="flex-col distance-mode">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode" :key="index" class="flex-col"
style="margin: 0 12upx;" @tap="onDurationChange(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-pink':'line-gray'">
<text>{{ index >= distanceMode.length-1 && !editDuration.length ? item.duration: item.duration+'小时'}}</text>
<text v-if="index >= distanceMode.length-1" class="cuIcon-edit text-lg"></text>
</view>
</view>
</view>
</view> -->
</view>
<!-- <view v-if="orderType ===2" class="flex-col distance-mode" style="margin: 40upx 20upx 40upx;">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode2" :key="index" class="flex-col"
style="margin: 0 6upx;" @tap="onDurationChange2(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-black':'line-gray'">
<text>{{item.duration<1?'半小时': item.duration+'小时'}}</text>
</view>
</view>
</view>
</view> -->
<view class="flex-col date-mode">
<view class="flex-row date-box">
<view class="part-1">
......@@ -548,18 +527,19 @@
orderDateDes:"",
orderWeekDes:"",
orderWeeEnum:{
1:"星期一",
2:"星期二",
3:"星期三",
4:"星期四",
5:"星期五",
6:"星期六",
0:"星期日",
1:"一",
2:"二",
3:"三",
4:"四",
5:"五",
6:"六",
0:"日",
},
allDayUseStatus: false, // 当日无可预约时段,true 无法预约,false 可预约
tipContent: "当前条件下无可预约的时段,请手动选择合适的空闲时段",
tipErrMsg: '',
warnTip:''
warnTip:'',
activityDate:{}
};
},
......@@ -1021,7 +1001,7 @@
readDate: this.dateList.length ? moment(this.dateList[1].readDate).add(i, "days").format(
"YYYY-MM-DD") : moment().add(i, "days").format("YYYY-MM-DD"),
weekday: this.dateList.length ? moment(this.dateList[1].readDate).add(i, "days").format(
"dddd") : moment().add(i, "days").format("dddd")
"ddd") : moment().add(i, "days").format("ddd")
}
dateList.push(obj)
}
......@@ -1080,6 +1060,23 @@
storeId: this.id
}).then(res=>{
console.log(res)
if(res.data.code ==200 && res.data.data){
let obj = res.data.data || {}
for(let key in obj){
let key2 = moment(key).format("YYYY-MM-DD")
if(obj[key] && obj[key].length){
this.activityDate[key2] = {
labelIds: obj[key].filter(item=> item.labelId).map(val => val.labelId),
packIds: obj[key].filter(item=> item.packId).map(val => val.packId),
}
}else{
this.activityDate[key2] = false
}
}
console.log(this.activityDate,"this.activityDate")
}
})
},
// 获取房间信息相关
......@@ -1946,6 +1943,26 @@
.text-first {
letter-spacing: 4upx;
}
.relative{
.absolute-right{
position: absolute;
top: -12upx;
right: -16upx;
image{
width: 32upx;
max-height: 30upx;
}
}
}
.absolute-right{
position: absolute;
top: -8upx;
right: -4upx;
image{
width: 38upx;
max-height: 34upx;
}
}
}
.active {
......
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