diff --git a/api/health.js b/api/health.js
index ad8c63a..7e8ab75 100644
--- a/api/health.js
+++ b/api/health.js
@@ -78,4 +78,12 @@ export function getRecipe(params) {
*/
export function getBanner() {
return request.get("/wellness/exhibition/banner")
-}
\ No newline at end of file
+}
+
+/**
+ * 康养生活-康养旅居顶部配置
+ * @returns
+ */
+export function getWellnessTopImage() {
+ return request.get("/wellness/topImage")
+}
diff --git a/api/inn.js b/api/inn.js
index a5eec2b..8dcb99e 100644
--- a/api/inn.js
+++ b/api/inn.js
@@ -191,6 +191,10 @@ export function getHotelTypeList() {
});
}
+export function getHotelBanner(params) {
+ return request.get("/hotelBanner", params);
+}
+
/**
* 店铺详情海报
* @param id 店铺ID int
diff --git a/api/join.js b/api/join.js
index a32d760..3854c48 100644
--- a/api/join.js
+++ b/api/join.js
@@ -65,6 +65,11 @@ export function getHotelInfo(params) {
return request.get("merchantApply/info/hotel", params, {login: true})
}
+// 获取千县名品店铺类型列表
+export function getCountyFamousHotelType() {
+ return request.get("/countyFamous/hotelType", {}, {login: true})
+}
+
/**
* 旅居管家入驻申请详情
*/
diff --git a/api/qianxian.js b/api/qianxian.js
index 14a7f86..110268d 100644
--- a/api/qianxian.js
+++ b/api/qianxian.js
@@ -312,3 +312,7 @@ export function getCityNewsCategory() {
export function getCityShopList(params) {
return request.get('/countyFamous/hotel', params, {login: true})
}
+
+export function getCountyFamousHotelType() {
+ return request.get('/countyFamous/hotelType', {}, {login: true})
+}
diff --git a/api/rooms.js b/api/rooms.js
index 3d32078..61db040 100644
--- a/api/rooms.js
+++ b/api/rooms.js
@@ -25,4 +25,5 @@ export function getMessageList(params) {
*/
export function replyMessage(data) {
return request.post("/user/reply/add", data, {login: true})
-}
\ No newline at end of file
+}
+
diff --git a/api/user.js b/api/user.js
index dd1ed6d..bc264e6 100644
--- a/api/user.js
+++ b/api/user.js
@@ -578,6 +578,10 @@ export function getHistory(params) {
return request.get('/history/list', params)
}
+export function deleteHistory(id) {
+ return request.delete(`/history/${id}`)
+}
+
/**
* 购物车猜你喜欢
* @param {*} params
@@ -598,4 +602,4 @@ export function queryUserGuide(params) {
export function setUserGuide(params) {
return request.post('/user/guide/status', params)
-}
\ No newline at end of file
+}
diff --git a/components/DateRangePicker/DateRangePicker.vue b/components/DateRangePicker/DateRangePicker.vue
index 0c2967f..a080334 100644
--- a/components/DateRangePicker/DateRangePicker.vue
+++ b/components/DateRangePicker/DateRangePicker.vue
@@ -14,7 +14,7 @@
原定时间:{{ originDate }}
-
+
-
-
- {{ day || '' }}
- {{ getDateStatus(day) }}
+
+
+
+ {{ day || '' }}
+ {{ getDateStatus(day) }}
+
+
+
+
+
+ {{ day || '' }}
+ {{ getDateStatus(day, prevYear, prevMonth) }}
+
@@ -111,7 +136,15 @@ export default {
tempStartDate: null,
tempEndDate: null,
dateStatusMap: {}, // 存储日期状态
- selectionState: 'initial' // 'initial' | 'selecting' | 'completed'
+ selectionState: 'initial', // 'initial' | 'selecting' | 'completed'
+ touchStartX: 0,
+ touchStartY: 0,
+ // 动画相关状态
+ isAnimating: false,
+ transitionMode: '', // 'next' or 'prev'
+ prevYear: null,
+ prevMonth: null,
+ prevMonthDays: []
}
},
@@ -169,37 +202,38 @@ export default {
methods: {
getDays(){
- uni.showLoading({
- title: '加载中...',
- mask: true,
- })
+ // uni.showLoading({
+ // title: '加载中...',
+ // mask: true,
+ // })
sojoumOrderCalendar({
travelGroupProductId: this.travelGroupProductId,
month: `${this.currentYear}-${String(this.currentMonth + 1).padStart(2, '0')}`
}).then(res => {
if (res.data) {
- // 更新日期状态映射
- this.dateStatusMap = {}
+ // 更新日期状态映射,使用合并而不是覆盖,以支持动画时的旧数据显示
+ const newStatusMap = {}
res.data.forEach(day => {
// inventoryStatus int 状态 (0:可预约, 1:已被预约, 2:不可预约)
- this.dateStatusMap[day.date] = day.inventoryStatus === 0 ? '可预约' : day.inventoryStatus === 1 ? '已被预约' : '不可预约'
+ newStatusMap[day.date] = day.inventoryStatus === 0 ? '可预约' : day.inventoryStatus === 1 ? '已被预约' : '不可预约'
})
+ this.dateStatusMap = { ...this.dateStatusMap, ...newStatusMap }
}
}).finally(() => {
uni.hideLoading()
})
},
- getDateStatus(day) {
+ getDateStatus(day, year, month) {
if (!day) return null
- const date = this.formatDate(this.getDateFromDay(day))
+ const date = this.formatDate(this.getDateFromDay(day, year, month))
return this.dateStatusMap[date]
},
- isDisabled(day) {
+ isDisabled(day, year, month) {
if (!day) return true
- const date = this.getDateFromDay(day)
+ const date = this.getDateFromDay(day, year, month)
// 禁用过去的日期(今天之前的日期)
const today = new Date()
today.setHours(0, 0, 0, 0)
@@ -210,7 +244,7 @@ export default {
if (this.maxDate && date > new Date(this.maxDate)) return true
// 检查预约状态
- const status = this.getDateStatus(day)
+ const status = this.getDateStatus(day, year, month)
// 只允许选择可预约的日期(状态为"可预约"),其他状态都禁用
return status !== '可预约'
@@ -242,6 +276,15 @@ export default {
},
changeMonth(delta) {
+ if (this.isAnimating) return
+
+ // Setup animation state
+ this.prevYear = this.currentYear
+ this.prevMonth = this.currentMonth
+ this.prevMonthDays = [...this.calendarDays]
+ this.transitionMode = delta > 0 ? 'next' : 'prev'
+ this.isAnimating = true
+
let newMonth = this.currentMonth + delta
if (newMonth < 0) {
this.currentYear--
@@ -251,6 +294,34 @@ export default {
newMonth = 0
}
this.currentMonth = newMonth
+
+ // Reset animation state after transition
+ setTimeout(() => {
+ this.isAnimating = false
+ this.prevMonthDays = []
+ }, 300)
+ },
+
+ onTouchStart(e) {
+ if (!e || !e.changedTouches || !e.changedTouches.length) return
+ this.touchStartX = e.changedTouches[0].clientX
+ this.touchStartY = e.changedTouches[0].clientY
+ },
+
+ onTouchEnd(e) {
+ if (!e || !e.changedTouches || !e.changedTouches.length) return
+ const touchEndX = e.changedTouches[0].clientX
+ const touchEndY = e.changedTouches[0].clientY
+ const deltaX = touchEndX - this.touchStartX
+ const deltaY = touchEndY - this.touchStartY
+ if (Math.abs(deltaX) <= Math.abs(deltaY)) return
+ const minDistance = 50
+ if (Math.abs(deltaX) < minDistance) return
+ if (deltaX < 0) {
+ this.changeMonth(1)
+ } else {
+ this.changeMonth(-1)
+ }
},
formatDate(date) {
@@ -261,8 +332,10 @@ export default {
return `${year}-${month}-${day}`
},
- getDateFromDay(day) {
- return day ? new Date(this.currentYear, this.currentMonth, day) : null
+ getDateFromDay(day, year, month) {
+ const y = year !== undefined ? year : this.currentYear
+ const m = month !== undefined ? month : this.currentMonth
+ return day ? new Date(y, m, day) : null
},
// isDisabled(day) {
@@ -281,42 +354,52 @@ export default {
// return false
// },
- isSelected(day) {
+ isSelected(day, year, month) {
if (!day) return false
- const date = this.getDateFromDay(day)
- return this.isStartDate(day) || this.isEndDate(day)
+ // const date = this.getDateFromDay(day, year, month) // Unused?
+ return this.isStartDate(day, year, month) || this.isEndDate(day, year, month)
},
- isStartDate(day) {
+ isStartDate(day, year, month) {
if (!day || !this.tempStartDate) return false
- const date = this.getDateFromDay(day)
+ const date = this.getDateFromDay(day, year, month)
return date.getTime() === this.tempStartDate.getTime()
},
- isEndDate(day) {
+ isEndDate(day, year, month) {
if (!day || !this.tempEndDate) return false
- const date = this.getDateFromDay(day)
+ const date = this.getDateFromDay(day, year, month)
return date.getTime() === this.tempEndDate.getTime()
},
- isInRange(day) {
+ isInRange(day, year, month) {
if (!day || !this.tempStartDate || !this.tempEndDate) return false
- const date = this.getDateFromDay(day)
+ const date = this.getDateFromDay(day, year, month)
return date > this.tempStartDate && date < this.tempEndDate
},
- isSelectingStart(day) {
+ isSelectingStart(day, year, month) {
if (!day || !this.tempStartDate || this.tempEndDate) return false
// 只有在选择状态且只有开始日期时才显示特殊样式
if (this.selectionState !== 'selecting') return false
- const date = this.getDateFromDay(day)
+ const date = this.getDateFromDay(day, year, month)
return date.getTime() === this.tempStartDate.getTime()
},
- selectDate(day) {
- if (!day || this.isDisabled(day)) return
+ selectDate(day, year, month) {
+ if (!day || this.isDisabled(day, year, month)) return
- const selectedDate = this.getDateFromDay(day)
+ const selectedDate = this.getDateFromDay(day, year, month)
+
+ // 如果设置了最小预订天数,则自动计算结束日期
+ if (this.minBookingDays > 0) {
+ this.tempStartDate = selectedDate
+ const endDate = new Date(selectedDate)
+ endDate.setDate(selectedDate.getDate() + this.minBookingDays - 1)
+ this.tempEndDate = endDate
+ this.selectionState = 'completed'
+ return
+ }
// 如果已有完整的日期区间(开始日期和结束日期都存在),重置选择
if (this.tempStartDate && this.tempEndDate && this.selectionState === 'completed') {
@@ -674,17 +757,57 @@ export default {
}
@keyframes pulse {
- 0% {
- opacity: 1;
- transform: scale(1);
+ 0% {
+ opacity: 1;
+ transform: scale(1);
+ }
+ 50% {
+ opacity: 0.7;
+ transform: scale(1.05);
+ }
+ 100% {
+ opacity: 1;
+ transform: scale(1);
+ }
}
- 50% {
- opacity: 0.7;
- transform: scale(1.05);
+
+ // Animation Styles
+ .calendar-body {
+ position: relative;
+ height: 480rpx; // 6 rows * 80rpx
+ overflow: hidden;
+ width: 100%;
}
- 100% {
- opacity: 1;
- transform: scale(1);
+
+ .days.absolute {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ // height: 100%;
+ z-index: 1;
}
-}
-
\ No newline at end of file
+
+ // Keyframes for sliding
+ @keyframes slide-next-enter {
+ from { transform: translateX(100%); }
+ to { transform: translateX(0); }
+ }
+ @keyframes slide-next-leave {
+ from { transform: translateX(0); }
+ to { transform: translateX(-100%); }
+ }
+ @keyframes slide-prev-enter {
+ from { transform: translateX(-100%); }
+ to { transform: translateX(0); }
+ }
+ @keyframes slide-prev-leave {
+ from { transform: translateX(0); }
+ to { transform: translateX(100%); }
+ }
+
+ .next-enter { animation: slide-next-enter 0.3s forwards; }
+ .next-leave { animation: slide-next-leave 0.3s forwards; }
+ .prev-enter { animation: slide-prev-enter 0.3s forwards; }
+ .prev-leave { animation: slide-prev-leave 0.3s forwards; }
+
diff --git a/components/cc-comment/componets/common.vue b/components/cc-comment/componets/common.vue
index ab19781..6ac0a6c 100644
--- a/components/cc-comment/componets/common.vue
+++ b/components/cc-comment/componets/common.vue
@@ -59,7 +59,7 @@ export default {
},
// 点赞数显示
cLikeCount: function () {
- return this.data.like_count === 0 ? "" : this.data.like_count > 99 ? `99+` : this.data.like_count;
+ return this.data.like_count === 0 ? "" : this.$formatCount(this.data.like_count);
},
},
watch: {
diff --git a/components/xdd-tabbar/index.vue b/components/xdd-tabbar/index.vue
index 3b7a827..c38be40 100644
--- a/components/xdd-tabbar/index.vue
+++ b/components/xdd-tabbar/index.vue
@@ -30,7 +30,6 @@
@click="gotoPage(item.url, item.type, item.index)"
>
-
{{ item.name }}
+
+ {{ unreadCountText }}
+
@@ -48,6 +53,8 @@
diff --git a/pkg_product/views/healthSanctum.vue b/pkg_product/views/healthSanctum.vue
index f35dd77..eb508dc 100644
--- a/pkg_product/views/healthSanctum.vue
+++ b/pkg_product/views/healthSanctum.vue
@@ -1,8 +1,22 @@
-
+
+
+
+
+
-
{{ tab.name }}
-
+ -->
+ 大家都在看
@@ -90,6 +105,7 @@