This commit is contained in:
JyuHsin
2025-03-25 14:39:36 +08:00
parent 7084976d72
commit 0a1214c1de
@@ -115,7 +115,7 @@ layout("/mobile/platform.html"){
}
</style>
<div id="app" v-cloak>
<div id="app" v-cloak v-if="isLoad">
<van-nav-bar
:title="site.name"
left-arrow
@@ -149,7 +149,7 @@ layout("/mobile/platform.html"){
</div>
<div class="container">
<table v-if="weekList.find(o => o.day === selectDate)?.disabled === false">
<table v-if="weekList.find(o => moment(o.day).unix() === moment(selectDate).unix())?.disabled === false">
<tr v-for="item in timeData">
<td class="time">{{item.start_time + '-' + item.end_time}}</td>
<td>
@@ -224,6 +224,7 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins],
data() {
return {
isLoad: false,
person: "${@shiro.getPrincipalProperty('username')}",
unit: "${@shiro.getPrincipalProperty('unit').getName()}",
phone: "${@shiro.getPrincipalProperty('mobile')}",
@@ -305,9 +306,16 @@ layout("/mobile/platform.html"){
while (wk.length < 7) {
const addDate = moment(startDate).add(count, 'd')
const addDateFormat = moment(addDate).format('YYYY-MM-DD')
let dis = false
if(this.site.openWeekTime && !this.site.openWeekTime.includes(addDate.day())) {
dis = true
}
if(this.site.notApplyTimeList && this.site.notApplyTimeList?.includes(addDateFormat)) {
dis = true
}
wk.push({
day: addDate,
disabled: !this.site.openWeekTime.includes(addDate.day()) || this.site.notApplyTimeList.includes(addDateFormat)
disabled: dis
})
count++
}
@@ -427,7 +435,7 @@ layout("/mobile/platform.html"){
this.selectDate = this.getLatestWorkDay()
this.setWeekList(this.selectDate)
await this.getMyReservation()
this.isLoad = true
}
})
</script>