Merge branch 'dev' into test
This commit is contained in:
@@ -79,3 +79,11 @@ export function getRecipe(params) {
|
|||||||
export function getBanner() {
|
export function getBanner() {
|
||||||
return request.get("/wellness/exhibition/banner")
|
return request.get("/wellness/exhibition/banner")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 康养生活-康养旅居顶部配置
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function getWellnessTopImage() {
|
||||||
|
return request.get("/wellness/topImage")
|
||||||
|
}
|
||||||
|
|||||||
@@ -191,6 +191,10 @@ export function getHotelTypeList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getHotelBanner(params) {
|
||||||
|
return request.get("/hotelBanner", params);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺详情海报
|
* 店铺详情海报
|
||||||
* @param id 店铺ID int
|
* @param id 店铺ID int
|
||||||
|
|||||||
@@ -65,6 +65,11 @@ export function getHotelInfo(params) {
|
|||||||
return request.get("merchantApply/info/hotel", params, {login: true})
|
return request.get("merchantApply/info/hotel", params, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取千县名品店铺类型列表
|
||||||
|
export function getCountyFamousHotelType() {
|
||||||
|
return request.get("/countyFamous/hotelType", {}, {login: true})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 旅居管家入驻申请详情
|
* 旅居管家入驻申请详情
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -312,3 +312,7 @@ export function getCityNewsCategory() {
|
|||||||
export function getCityShopList(params) {
|
export function getCityShopList(params) {
|
||||||
return request.get('/countyFamous/hotel', params, {login: true})
|
return request.get('/countyFamous/hotel', params, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCountyFamousHotelType() {
|
||||||
|
return request.get('/countyFamous/hotelType', {}, {login: true})
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,3 +26,4 @@ export function getMessageList(params) {
|
|||||||
export function replyMessage(data) {
|
export function replyMessage(data) {
|
||||||
return request.post("/user/reply/add", data, {login: true})
|
return request.post("/user/reply/add", data, {login: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -578,6 +578,10 @@ export function getHistory(params) {
|
|||||||
return request.get('/history/list', params)
|
return request.get('/history/list', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deleteHistory(id) {
|
||||||
|
return request.delete(`/history/${id}`)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购物车猜你喜欢
|
* 购物车猜你喜欢
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
原定时间:{{ originDate }}
|
原定时间:{{ originDate }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="calendar">
|
<view class="calendar" @touchstart="onTouchStart" @touchend="onTouchEnd">
|
||||||
<view class="calendar-header">
|
<view class="calendar-header">
|
||||||
<view class="month-nav">
|
<view class="month-nav">
|
||||||
<text class="nav-btn" @click="changeMonth(-1)">〈</text>
|
<text class="nav-btn" @click="changeMonth(-1)">〈</text>
|
||||||
@@ -28,33 +28,58 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="days">
|
<view class="calendar-body">
|
||||||
<view
|
<view class="days" :class="[isAnimating ? 'absolute ' + transitionMode + '-enter' : '']">
|
||||||
v-for="(day, index) in calendarDays"
|
<view
|
||||||
:key="index"
|
v-for="(day, index) in calendarDays"
|
||||||
class="day"
|
:key="index"
|
||||||
:class="{
|
class="day"
|
||||||
'empty': !day,
|
:class="{
|
||||||
'selected': isSelected(day),
|
'empty': !day,
|
||||||
'in-range': isInRange(day),
|
'selected': isSelected(day),
|
||||||
'start-date': isStartDate(day),
|
'in-range': isInRange(day),
|
||||||
'end-date': isEndDate(day),
|
'start-date': isStartDate(day),
|
||||||
'selecting-start': isSelectingStart(day),
|
'end-date': isEndDate(day),
|
||||||
'disabled': isDisabled(day),
|
'selecting-start': isSelectingStart(day),
|
||||||
'booked': getDateStatus(day) === 1,
|
'disabled': isDisabled(day),
|
||||||
'unavailable': getDateStatus(day) === 2,
|
'booked': getDateStatus(day) === '已被预约',
|
||||||
'available': getDateStatus(day) === 0
|
'unavailable': getDateStatus(day) === '不可预约',
|
||||||
}"
|
'available': getDateStatus(day) === '可预约'
|
||||||
@click="selectDate(day)"
|
}"
|
||||||
>
|
@click="selectDate(day)"
|
||||||
<text>{{ day || '' }}</text>
|
>
|
||||||
<view class="v12-font-20" v-if="day && getDateStatus(day) !== null">{{ getDateStatus(day) }}</view>
|
<text>{{ day || '' }}</text>
|
||||||
|
<view class="v12-font-20" v-if="day && getDateStatus(day) !== null">{{ getDateStatus(day) }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="days absolute" v-if="isAnimating" :class="[transitionMode + '-leave']">
|
||||||
|
<view
|
||||||
|
v-for="(day, index) in prevMonthDays"
|
||||||
|
:key="'prev-' + index"
|
||||||
|
class="day"
|
||||||
|
:class="{
|
||||||
|
'empty': !day,
|
||||||
|
'selected': isSelected(day, prevYear, prevMonth),
|
||||||
|
'in-range': isInRange(day, prevYear, prevMonth),
|
||||||
|
'start-date': isStartDate(day, prevYear, prevMonth),
|
||||||
|
'end-date': isEndDate(day, prevYear, prevMonth),
|
||||||
|
'selecting-start': isSelectingStart(day, prevYear, prevMonth),
|
||||||
|
'disabled': isDisabled(day, prevYear, prevMonth),
|
||||||
|
'booked': getDateStatus(day, prevYear, prevMonth) === '已被预约',
|
||||||
|
'unavailable': getDateStatus(day, prevYear, prevMonth) === '不可预约',
|
||||||
|
'available': getDateStatus(day, prevYear, prevMonth) === '可预约'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<text>{{ day || '' }}</text>
|
||||||
|
<view class="v12-font-20" v-if="day && getDateStatus(day, prevYear, prevMonth) !== null">{{ getDateStatus(day, prevYear, prevMonth) }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="picker-footer">
|
<view class="picker-footer">
|
||||||
<button class="btn btn-confirm" @click="confirmSelect">确定</button>
|
<button class="btn btn-confirm" @click="confirmSelect">立即预订</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
@@ -111,7 +136,15 @@ export default {
|
|||||||
tempStartDate: null,
|
tempStartDate: null,
|
||||||
tempEndDate: null,
|
tempEndDate: null,
|
||||||
dateStatusMap: {}, // 存储日期状态
|
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: {
|
methods: {
|
||||||
getDays(){
|
getDays(){
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
title: '加载中...',
|
// title: '加载中...',
|
||||||
mask: true,
|
// mask: true,
|
||||||
})
|
// })
|
||||||
sojoumOrderCalendar({
|
sojoumOrderCalendar({
|
||||||
travelGroupProductId: this.travelGroupProductId,
|
travelGroupProductId: this.travelGroupProductId,
|
||||||
month: `${this.currentYear}-${String(this.currentMonth + 1).padStart(2, '0')}`
|
month: `${this.currentYear}-${String(this.currentMonth + 1).padStart(2, '0')}`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
// 更新日期状态映射
|
// 更新日期状态映射,使用合并而不是覆盖,以支持动画时的旧数据显示
|
||||||
this.dateStatusMap = {}
|
const newStatusMap = {}
|
||||||
res.data.forEach(day => {
|
res.data.forEach(day => {
|
||||||
// inventoryStatus int 状态 (0:可预约, 1:已被预约, 2:不可预约)
|
// 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(() => {
|
}).finally(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getDateStatus(day) {
|
getDateStatus(day, year, month) {
|
||||||
if (!day) return null
|
if (!day) return null
|
||||||
const date = this.formatDate(this.getDateFromDay(day))
|
const date = this.formatDate(this.getDateFromDay(day, year, month))
|
||||||
return this.dateStatusMap[date]
|
return this.dateStatusMap[date]
|
||||||
},
|
},
|
||||||
|
|
||||||
isDisabled(day) {
|
isDisabled(day, year, month) {
|
||||||
|
|
||||||
if (!day) return true
|
if (!day) return true
|
||||||
const date = this.getDateFromDay(day)
|
const date = this.getDateFromDay(day, year, month)
|
||||||
// 禁用过去的日期(今天之前的日期)
|
// 禁用过去的日期(今天之前的日期)
|
||||||
const today = new Date()
|
const today = new Date()
|
||||||
today.setHours(0, 0, 0, 0)
|
today.setHours(0, 0, 0, 0)
|
||||||
@@ -210,7 +244,7 @@ export default {
|
|||||||
if (this.maxDate && date > new Date(this.maxDate)) return true
|
if (this.maxDate && date > new Date(this.maxDate)) return true
|
||||||
|
|
||||||
// 检查预约状态
|
// 检查预约状态
|
||||||
const status = this.getDateStatus(day)
|
const status = this.getDateStatus(day, year, month)
|
||||||
// 只允许选择可预约的日期(状态为"可预约"),其他状态都禁用
|
// 只允许选择可预约的日期(状态为"可预约"),其他状态都禁用
|
||||||
|
|
||||||
return status !== '可预约'
|
return status !== '可预约'
|
||||||
@@ -242,6 +276,15 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
changeMonth(delta) {
|
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
|
let newMonth = this.currentMonth + delta
|
||||||
if (newMonth < 0) {
|
if (newMonth < 0) {
|
||||||
this.currentYear--
|
this.currentYear--
|
||||||
@@ -251,6 +294,34 @@ export default {
|
|||||||
newMonth = 0
|
newMonth = 0
|
||||||
}
|
}
|
||||||
this.currentMonth = newMonth
|
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) {
|
formatDate(date) {
|
||||||
@@ -261,8 +332,10 @@ export default {
|
|||||||
return `${year}-${month}-${day}`
|
return `${year}-${month}-${day}`
|
||||||
},
|
},
|
||||||
|
|
||||||
getDateFromDay(day) {
|
getDateFromDay(day, year, month) {
|
||||||
return day ? new Date(this.currentYear, this.currentMonth, day) : null
|
const y = year !== undefined ? year : this.currentYear
|
||||||
|
const m = month !== undefined ? month : this.currentMonth
|
||||||
|
return day ? new Date(y, m, day) : null
|
||||||
},
|
},
|
||||||
|
|
||||||
// isDisabled(day) {
|
// isDisabled(day) {
|
||||||
@@ -281,42 +354,52 @@ export default {
|
|||||||
// return false
|
// return false
|
||||||
// },
|
// },
|
||||||
|
|
||||||
isSelected(day) {
|
isSelected(day, year, month) {
|
||||||
if (!day) return false
|
if (!day) return false
|
||||||
const date = this.getDateFromDay(day)
|
// const date = this.getDateFromDay(day, year, month) // Unused?
|
||||||
return this.isStartDate(day) || this.isEndDate(day)
|
return this.isStartDate(day, year, month) || this.isEndDate(day, year, month)
|
||||||
},
|
},
|
||||||
|
|
||||||
isStartDate(day) {
|
isStartDate(day, year, month) {
|
||||||
if (!day || !this.tempStartDate) return false
|
if (!day || !this.tempStartDate) return false
|
||||||
const date = this.getDateFromDay(day)
|
const date = this.getDateFromDay(day, year, month)
|
||||||
return date.getTime() === this.tempStartDate.getTime()
|
return date.getTime() === this.tempStartDate.getTime()
|
||||||
},
|
},
|
||||||
|
|
||||||
isEndDate(day) {
|
isEndDate(day, year, month) {
|
||||||
if (!day || !this.tempEndDate) return false
|
if (!day || !this.tempEndDate) return false
|
||||||
const date = this.getDateFromDay(day)
|
const date = this.getDateFromDay(day, year, month)
|
||||||
return date.getTime() === this.tempEndDate.getTime()
|
return date.getTime() === this.tempEndDate.getTime()
|
||||||
},
|
},
|
||||||
|
|
||||||
isInRange(day) {
|
isInRange(day, year, month) {
|
||||||
if (!day || !this.tempStartDate || !this.tempEndDate) return false
|
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
|
return date > this.tempStartDate && date < this.tempEndDate
|
||||||
},
|
},
|
||||||
|
|
||||||
isSelectingStart(day) {
|
isSelectingStart(day, year, month) {
|
||||||
if (!day || !this.tempStartDate || this.tempEndDate) return false
|
if (!day || !this.tempStartDate || this.tempEndDate) return false
|
||||||
// 只有在选择状态且只有开始日期时才显示特殊样式
|
// 只有在选择状态且只有开始日期时才显示特殊样式
|
||||||
if (this.selectionState !== 'selecting') 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()
|
return date.getTime() === this.tempStartDate.getTime()
|
||||||
},
|
},
|
||||||
|
|
||||||
selectDate(day) {
|
selectDate(day, year, month) {
|
||||||
if (!day || this.isDisabled(day)) return
|
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') {
|
if (this.tempStartDate && this.tempEndDate && this.selectionState === 'completed') {
|
||||||
@@ -674,17 +757,57 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulse {
|
@keyframes pulse {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 0.7;
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
50% {
|
|
||||||
opacity: 0.7;
|
// Animation Styles
|
||||||
transform: scale(1.05);
|
.calendar-body {
|
||||||
|
position: relative;
|
||||||
|
height: 480rpx; // 6 rows * 80rpx
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
100% {
|
|
||||||
opacity: 1;
|
.days.absolute {
|
||||||
transform: scale(1);
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// 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; }
|
||||||
</style>
|
</style>
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点赞数显示
|
// 点赞数显示
|
||||||
cLikeCount: function () {
|
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: {
|
watch: {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
@click="gotoPage(item.url, item.type, item.index)"
|
@click="gotoPage(item.url, item.type, item.index)"
|
||||||
>
|
>
|
||||||
<view class="img-wrap">
|
<view class="img-wrap">
|
||||||
<!-- 预加载两张图片,可以在点击切换的时候不闪屏 -->
|
|
||||||
<image
|
<image
|
||||||
:src="item.onIcon"
|
:src="item.onIcon"
|
||||||
class="img on"
|
class="img on"
|
||||||
@@ -41,6 +40,12 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="name">{{ item.name }}</view>
|
<view class="name">{{ item.name }}</view>
|
||||||
|
<view
|
||||||
|
v-if="item.name === '消息' && showUnreadBadge"
|
||||||
|
class="badge"
|
||||||
|
>
|
||||||
|
{{ unreadCountText }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,6 +53,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import store from '@/store'
|
||||||
|
import { getUnreadMessageCount, getUnreadMessageCountForSeller } from '@/api/rooms'
|
||||||
export default {
|
export default {
|
||||||
name: 'XddTabbar',
|
name: 'XddTabbar',
|
||||||
props: {
|
props: {
|
||||||
@@ -93,14 +100,57 @@ export default {
|
|||||||
type: 1,
|
type: 1,
|
||||||
index: 3
|
index: 3
|
||||||
}
|
}
|
||||||
]]
|
]],
|
||||||
|
unreadCount: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isLogin() {
|
||||||
|
return store.getters.isLogin
|
||||||
|
},
|
||||||
|
showUnreadBadge() {
|
||||||
|
return this.isLogin && this.unreadCount > 0
|
||||||
|
},
|
||||||
|
unreadCountText() {
|
||||||
|
if (this.unreadCount > 99) {
|
||||||
|
return '99+'
|
||||||
|
}
|
||||||
|
return this.unreadCount
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isLogin(val) {
|
||||||
|
if (val) {
|
||||||
|
this.fetchUnreadCount()
|
||||||
|
} else {
|
||||||
|
this.unreadCount = 0
|
||||||
|
uni.$emit('updateUnreadMessageCount', 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getElementData('#quweiIcon')
|
this.getElementData('#quweiIcon')
|
||||||
this.getIconData('#icon1')
|
this.getIconData('#icon1')
|
||||||
|
if (this.isLogin) {
|
||||||
|
this.fetchUnreadCount()
|
||||||
|
}
|
||||||
|
uni.$on('updateUnreadMessageCount', this.handleUpdateUnreadMessageCount)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
uni.$off('updateUnreadMessageCount', this.handleUpdateUnreadMessageCount)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleUpdateUnreadMessageCount(count) {
|
||||||
|
if (!this.isLogin) {
|
||||||
|
this.unreadCount = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof count === 'number') {
|
||||||
|
this.unreadCount = count
|
||||||
|
} else {
|
||||||
|
this.fetchUnreadCount()
|
||||||
|
}
|
||||||
|
},
|
||||||
getElementData(el) {
|
getElementData(el) {
|
||||||
const query = uni.createSelectorQuery().in(this)
|
const query = uni.createSelectorQuery().in(this)
|
||||||
query.select(el).boundingClientRect().exec((res)=> {
|
query.select(el).boundingClientRect().exec((res)=> {
|
||||||
@@ -117,10 +167,37 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
fetchUnreadCount() {
|
||||||
* 跳转至目标页面
|
uni.request({
|
||||||
* type: 1-tabbar页面,2-非tabbar页面
|
url: this.$SERVICE_API_URL + '/unread-num',
|
||||||
*/
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
uid: store.getters.userInfo.uid
|
||||||
|
},
|
||||||
|
success:(res)=>{
|
||||||
|
if(res.data.status_code === 200) {
|
||||||
|
const count = res.data.content || 0
|
||||||
|
getUnreadMessageCount().then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success) {
|
||||||
|
const _count = data || 0
|
||||||
|
this.unreadCount = count + _count
|
||||||
|
uni.$emit('updateUnreadMessageCount', this.unreadCount)
|
||||||
|
} else {
|
||||||
|
this.unreadCount = 0
|
||||||
|
uni.$emit('updateUnreadMessageCount', 0)
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.unreadCount = 0
|
||||||
|
uni.$emit('updateUnreadMessageCount', 0)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.unreadCount = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
gotoPage(url, type = 1, index) {
|
gotoPage(url, type = 1, index) {
|
||||||
if (this.currIndex === index) return
|
if (this.currIndex === index) return
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
@@ -199,6 +276,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
|
position: relative;
|
||||||
&.curr {
|
&.curr {
|
||||||
.name {
|
.name {
|
||||||
color: #C52733;
|
color: #C52733;
|
||||||
@@ -211,6 +289,21 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.badge {
|
||||||
|
position: absolute;
|
||||||
|
top: -4rpx;
|
||||||
|
right: 32rpx;
|
||||||
|
min-width: 28rpx;
|
||||||
|
padding: 0 6rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
line-height: 28rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
background-color: #FF564A;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,18 @@ const force2Decimal = function change2Decimal(value) {
|
|||||||
return forceToDecimal(value, 2)
|
return forceToDecimal(value, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formatCount = function(value) {
|
||||||
|
if (!value) return 0;
|
||||||
|
const num = parseFloat(value);
|
||||||
|
if (isNaN(num)) return 0;
|
||||||
|
if (num >= 10000) {
|
||||||
|
let val = num / 10000;
|
||||||
|
val = parseFloat(val.toFixed(1));
|
||||||
|
return val + '万';
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
const toast = (title = '', position = 'center', success = function() {}) => {
|
const toast = (title = '', position = 'center', success = function() {}) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title,
|
title,
|
||||||
@@ -88,6 +100,7 @@ const toast = (title = '', position = 'center', success = function() {}) => {
|
|||||||
|
|
||||||
Vue.prototype.$force2Decimal = force2Decimal
|
Vue.prototype.$force2Decimal = force2Decimal
|
||||||
Vue.prototype.$forceToDecimal = forceToDecimal
|
Vue.prototype.$forceToDecimal = forceToDecimal
|
||||||
|
Vue.prototype.$formatCount = formatCount
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
|
|||||||
+1
-1
@@ -532,7 +532,7 @@
|
|||||||
"path": "views/healthFoods",
|
"path": "views/healthFoods",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "康养旅居",
|
"navigationBarTitleText": "康养旅居",
|
||||||
"navigationBarBackgroundColor": "#FAEED8"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -440,6 +440,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
|
uni.$emit('updateUnreadMessageCount')
|
||||||
if (!this.isLoad) {
|
if (!this.isLoad) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+64
-11
@@ -76,7 +76,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="type-banner-wrap">
|
<view class="type-banner-wrap" v-if="typeIndex !== -1">
|
||||||
<view v-if="currType.titleImage" class="title">
|
<view v-if="currType.titleImage" class="title">
|
||||||
<image
|
<image
|
||||||
:src="currType.titleImage"
|
:src="currType.titleImage"
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
class="img"
|
class="img"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="currType.carousel" class="slider-wrap">
|
<view v-if="hotelBanner.length" class="slider-wrap">
|
||||||
<swiper
|
<swiper
|
||||||
indicatorDots="true"
|
indicatorDots="true"
|
||||||
indicator-color="rgba(255, 255, 255, .3)"
|
indicator-color="rgba(255, 255, 255, .3)"
|
||||||
@@ -94,12 +94,12 @@
|
|||||||
style="height: 330rpx;"
|
style="height: 330rpx;"
|
||||||
>
|
>
|
||||||
<block
|
<block
|
||||||
v-for="(item, bannerIndex) in currType.carousel"
|
v-for="(item, bannerIndex) in hotelBanner"
|
||||||
:key="bannerIndex"
|
:key="bannerIndex"
|
||||||
>
|
>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="swiper-item" @click="typeBannerItemClick(item)">
|
<view class="swiper-item" @click="typeBannerItemClick(item)">
|
||||||
<image :src="item.carouselImage" class="img" />
|
<image :src="item.bannerImage" class="img" />
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
@@ -120,9 +120,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body" v-else>
|
<view class="body" v-else>
|
||||||
<view class="v12-justify-between v12-align-center">
|
<view class="v12-justify-between v12-align-center" v-if="hotelList.length > 0">
|
||||||
<text class="v12-font-bold" v-if="currType.carousel">推荐</text>
|
<text class="v12-font-bold" v-if="hotelBanner.length">推荐</text>
|
||||||
<view class="v12-dark1-text v12-font-28 v12-align-center" @click="handleRefresh">
|
<view class="v12-dark1-text v12-font-28 v12-align-center refresh-btn" @click="handleRefresh">
|
||||||
<u-icon name="reload"></u-icon>
|
<u-icon name="reload"></u-icon>
|
||||||
换一换
|
换一换
|
||||||
</view>
|
</view>
|
||||||
@@ -170,7 +170,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getHotelList, getHotelTypeList, getAncientTownIcon, getAncientTownList } from "@/api/inn.js"
|
import { getHotelList, getHotelTypeList, getAncientTownIcon, getAncientTownList, getHotelBanner } from "@/api/inn.js"
|
||||||
|
import { fetchCity } from "@/api/wenwan"
|
||||||
import { getCurAddress, getLocation } from "@/utils/common"
|
import { getCurAddress, getLocation } from "@/utils/common"
|
||||||
import FunHotelItem from './components/HotelItem'
|
import FunHotelItem from './components/HotelItem'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
@@ -202,7 +203,10 @@ export default {
|
|||||||
isNext: false,
|
isNext: false,
|
||||||
townConfig: {},
|
townConfig: {},
|
||||||
townList: [],
|
townList: [],
|
||||||
randomSeed: null
|
randomSeed: null,
|
||||||
|
hotelBanner: [],
|
||||||
|
goodCityId: '',
|
||||||
|
cityOptions: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -223,8 +227,12 @@ export default {
|
|||||||
this.fetchList(random, this.randomSeed)
|
this.fetchList(random, this.randomSeed)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
this.currType = {}
|
this.currType = {}
|
||||||
|
if (options && options.city) {
|
||||||
|
this.goodCityId = options.city
|
||||||
|
}
|
||||||
|
this.initGoodCity()
|
||||||
getHotelTypeList().then(({data}) => {
|
getHotelTypeList().then(({data}) => {
|
||||||
this.typeList = data
|
this.typeList = data
|
||||||
this.currType = this.typeIndex === -1 ? {} : data[this.typeIndex]
|
this.currType = this.typeIndex === -1 ? {} : data[this.typeIndex]
|
||||||
@@ -234,6 +242,7 @@ export default {
|
|||||||
this.queryGuide('findFunIndex')
|
this.queryGuide('findFunIndex')
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
uni.$emit('updateUnreadMessageCount')
|
||||||
const memCityName = uni.getStorageSync('cityName')
|
const memCityName = uni.getStorageSync('cityName')
|
||||||
// this.typeIndex = 0
|
// this.typeIndex = 0
|
||||||
this.name = ''
|
this.name = ''
|
||||||
@@ -246,7 +255,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
cityName: {
|
cityName: {
|
||||||
handler(value) {
|
handler(value) {
|
||||||
if(value) {
|
if (value) {
|
||||||
|
this.updateGoodCityId()
|
||||||
this.search()
|
this.search()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -445,6 +455,27 @@ export default {
|
|||||||
this.townConfig = res.data
|
this.townConfig = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
initGoodCity() {
|
||||||
|
fetchCity(2).then(({ data }) => {
|
||||||
|
const group = data && data.group ? data.group : []
|
||||||
|
const list = []
|
||||||
|
group.forEach(item => {
|
||||||
|
if (item.city && item.city.length) {
|
||||||
|
list.push(...item.city)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.cityOptions = list
|
||||||
|
this.updateGoodCityId()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
updateGoodCityId() {
|
||||||
|
if (!this.cityOptions.length || !this.cityName) return
|
||||||
|
const found = this.cityOptions.find(item => item.cityName === this.cityName)
|
||||||
|
if (found) {
|
||||||
|
this.goodCityId = found.id || found.cityId || this.goodCityId
|
||||||
|
this.fetchHotelBanner()
|
||||||
|
}
|
||||||
|
},
|
||||||
goCity() {
|
goCity() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
url: `/pages/chose-city/chose-city?type=2&city=${this.cityName}`
|
||||||
@@ -531,6 +562,24 @@ export default {
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
fetchHotelBanner() {
|
||||||
|
if (!this.goodCityId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
goodCityId: this.goodCityId
|
||||||
|
}
|
||||||
|
getHotelBanner(params).then(res => {
|
||||||
|
const { success, data } = res
|
||||||
|
if (success && data) {
|
||||||
|
if (Array.isArray(data.hotelBanner)) {
|
||||||
|
this.hotelBanner = data.hotelBanner
|
||||||
|
} else if (Array.isArray(data)) {
|
||||||
|
this.hotelBanner = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
typeBannerItemClick(item) {
|
typeBannerItemClick(item) {
|
||||||
if (!item.hotelId) return
|
if (!item.hotelId) return
|
||||||
uni.navigateTo({ url: `/pagesInn/inn/innHome?id=${item.hotelId}` })
|
uni.navigateTo({ url: `/pagesInn/inn/innHome?id=${item.hotelId}` })
|
||||||
@@ -711,6 +760,10 @@ export default {
|
|||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.refresh-btn {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.city-box {
|
.city-box {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt v12-font-28">{{ item.pv }}</text>
|
<text class="seeNum-txt v12-font-28">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.hasZan ? 'on' : ''"
|
:class="item.hasZan ? 'on' : ''"
|
||||||
class="seeNum-txt v12-font-28 v12-ml-1"
|
class="seeNum-txt v12-font-28 v12-ml-1"
|
||||||
>{{ item.zan }}</text
|
>{{ $formatCount(item.zan) }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -497,6 +497,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.pageToShowHandle()
|
this.pageToShowHandle()
|
||||||
|
uni.$emit('updateUnreadMessageCount')
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.pageToHideHandle()
|
this.pageToHideHandle()
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ export default {
|
|||||||
{ name: '全部' },
|
{ name: '全部' },
|
||||||
{ name: '待付款' },
|
{ name: '待付款' },
|
||||||
{ name: '待发货' },
|
{ name: '待发货' },
|
||||||
{ name: '待收货/待核销' },
|
{ name: '待收货' },
|
||||||
{ name: '退款/售后' },
|
{ name: '退款/售后' },
|
||||||
{ name: '待评价' },
|
{ name: '待评价' },
|
||||||
{ name: '已完成' }
|
{ name: '已完成' }
|
||||||
@@ -870,8 +870,32 @@ export default {
|
|||||||
orderTypeTabChange(item) {
|
orderTypeTabChange(item) {
|
||||||
this.orderTypeTabIndex = item.index
|
this.orderTypeTabIndex = item.index
|
||||||
this.orderType = item.orderType
|
this.orderType = item.orderType
|
||||||
|
this.updateTabListByOrderType()
|
||||||
this.changeType()
|
this.changeType()
|
||||||
},
|
},
|
||||||
|
updateTabListByOrderType() {
|
||||||
|
if (this.orderType === 'travel') {
|
||||||
|
this.tabList = [
|
||||||
|
{ name: '全部' },
|
||||||
|
{ name: '待付款' },
|
||||||
|
{ name: '待确认' },
|
||||||
|
{ name: '待使用' },
|
||||||
|
{ name: '退款/售后' },
|
||||||
|
{ name: '待评价' },
|
||||||
|
{ name: '已完成' }
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
this.tabList = [
|
||||||
|
{ name: '全部' },
|
||||||
|
{ name: '待付款' },
|
||||||
|
{ name: '待发货' },
|
||||||
|
{ name: '待收货/待核销' },
|
||||||
|
{ name: '退款/售后' },
|
||||||
|
{ name: '待评价' },
|
||||||
|
{ name: '已完成' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
changeType() {
|
changeType() {
|
||||||
this.orderList = []
|
this.orderList = []
|
||||||
this.page = 1
|
this.page = 1
|
||||||
@@ -930,7 +954,7 @@ export default {
|
|||||||
status = "待付款"
|
status = "待付款"
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
status = order.isTravelGroup === 1 ? "待使用" : "待发货"
|
status = order.isTravelGroup === 1 ? "待确认" : "待发货"
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
status = order.isTravelGroup === 1 ? "待使用" : "待收货"
|
status = order.isTravelGroup === 1 ? "待使用" : "待收货"
|
||||||
|
|||||||
@@ -119,7 +119,16 @@
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="type">
|
<view class="type">
|
||||||
<view v-if="item.typeName" class="type-tag">
|
<view
|
||||||
|
v-if="item.isTravel === 1"
|
||||||
|
class="type-tag-travel"
|
||||||
|
>
|
||||||
|
旅居店铺
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-else-if="item.typeName"
|
||||||
|
class="type-tag"
|
||||||
|
>
|
||||||
{{ item.typeName }}
|
{{ item.typeName }}
|
||||||
</view>
|
</view>
|
||||||
<view v-else> </view>
|
<view v-else> </view>
|
||||||
@@ -261,12 +270,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
hotelItemClick(item) {
|
hotelItemClick(item) {
|
||||||
this.$yrouter.push({
|
if (item.isTravel === 1) {
|
||||||
path: '/pagesInn/inn/innHome',
|
uni.navigateTo({
|
||||||
query: {
|
url: '/pkg_product/views/sojoumStore?id=' + item.id
|
||||||
id: item.id
|
})
|
||||||
}
|
} else {
|
||||||
})
|
this.$yrouter.push({
|
||||||
|
path: '/pagesInn/inn/innHome',
|
||||||
|
query: {
|
||||||
|
id: item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
if (this.loading || this.loadend) {
|
if (this.loading || this.loadend) {
|
||||||
@@ -531,6 +546,13 @@ export default {
|
|||||||
color: #946300;
|
color: #946300;
|
||||||
background: linear-gradient(to bottom, #FDF8B9, #E3A72C);
|
background: linear-gradient(to bottom, #FDF8B9, #E3A72C);
|
||||||
}
|
}
|
||||||
|
.type-tag-travel {
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
background: linear-gradient(to bottom, #77E49F, #4FA379);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.desc {
|
.desc {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt v12-font-28">{{ item.pv }}</text>
|
<text class="seeNum-txt v12-font-28">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
class="v12-white v12-radius-20 history-card"
|
class="v12-white v12-radius-20 history-card"
|
||||||
@click="goodsDetail(historyItem)"
|
@click="goodsDetail(historyItem)"
|
||||||
>
|
>
|
||||||
|
<view class="delete-icon" @click.stop="deleteHistoryItem(historyItem)">
|
||||||
|
<u-icon
|
||||||
|
name="close"
|
||||||
|
color="#fff"
|
||||||
|
size="16"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<image
|
<image
|
||||||
class="goods-img"
|
class="goods-img"
|
||||||
:src="historyItem.image"
|
:src="historyItem.image"
|
||||||
@@ -83,7 +90,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getHistory } from '@/api/user'
|
import { getHistory, deleteHistory as deleteHistoryApi } from '@/api/user'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -179,6 +186,21 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
deleteHistoryItem(historyItem) {
|
||||||
|
const id = historyItem.id
|
||||||
|
if (!id) return
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确认删除该浏览足迹吗?',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
deleteHistoryApi(id).then(() => {
|
||||||
|
this.queryHistory()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
queryHistory() {
|
queryHistory() {
|
||||||
this.items = []
|
this.items = []
|
||||||
this.isLoad = false
|
this.isLoad = false
|
||||||
@@ -245,6 +267,7 @@ export default {
|
|||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
&:nth-child(3n) {
|
&:nth-child(3n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
@@ -271,6 +294,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.delete-icon{
|
||||||
|
position: absolute;
|
||||||
|
top: 8rpx;
|
||||||
|
right: 8rpx;
|
||||||
|
z-index: 2;
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
// background-color: rgba(0, 0, 0, 0.35);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.active{
|
.active{
|
||||||
background: #C52733;
|
background: #C52733;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
|||||||
@@ -402,6 +402,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
uni.$emit('updateUnreadMessageCount')
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
this.isNoLogin = false
|
this.isNoLogin = false
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
<view class="acea-row row-left row-middle">
|
<view class="acea-row row-left row-middle">
|
||||||
<view class="see-num-box acea-row row-middle" style="margin-right: 20rpx;">
|
<view class="see-num-box acea-row row-middle" style="margin-right: 20rpx;">
|
||||||
<image :src="webUrl+'/20230304131559277594.png'" class="eye-icon" mode=""></image>
|
<image :src="webUrl+'/20230304131559277594.png'" class="eye-icon" mode=""></image>
|
||||||
<text class="see-num-text">{{item.pv||0}}</text>
|
<text class="see-num-text">{{$formatCount(item.pv||0)}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="zan-num-box acea-row row-middle">
|
<view class="zan-num-box acea-row row-middle">
|
||||||
<img class="zan-icon" :src="webUrl+'/20230304133322439350.png'" />
|
<img class="zan-icon" :src="webUrl+'/20230304133322439350.png'" />
|
||||||
<text class="zan-num-text">{{item.zan||0}}</text>
|
<text class="zan-num-text">{{$formatCount(item.zan||0)}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList"
|
<view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList"
|
||||||
:key="addressListIndex" @click="tapAddress(item)">
|
:key="addressListIndex" @click="tapAddress(item)">
|
||||||
|
<view v-if="choosMode" @click.stop="editAddress(addressListIndex)" style="position: absolute; right: 20rpx; top: 0; z-index: 10; padding: 0;" :style="item.isDefault||item.isDefault=='1' ? 'right: 80rpx' : ''">
|
||||||
|
<text class="iconfont icon-bianji" style="color: #999; font-size: 32rpx;"></text>
|
||||||
|
</view>
|
||||||
<view v-if="item.isDefault||item.isDefault=='1' ? true : false" class=""
|
<view v-if="item.isDefault||item.isDefault=='1' ? true : false" class=""
|
||||||
style="position: absolute;top: 0;right: 0;">
|
style="position: absolute;top: 0;right: 0;">
|
||||||
<image style="width: 72rpx;height: 36rpx;" :src="webUrl+'/20210807165228290910.png'" mode=""></image>
|
<image style="width: 72rpx;height: 36rpx;" :src="webUrl+'/20210807165228290910.png'" mode=""></image>
|
||||||
@@ -27,7 +30,7 @@
|
|||||||
<u-icon name="checkbox-mark" color="#C52733" size="20"></u-icon>
|
<u-icon name="checkbox-mark" color="#C52733" size="20"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!choosMode" class="operation acea-row row-between-wrapper">
|
<view class="operation acea-row row-between-wrapper" v-if="!choosMode">
|
||||||
<view class="select-btn">
|
<view class="select-btn">
|
||||||
<view class="checkbox-wrapper">
|
<view class="checkbox-wrapper">
|
||||||
<checkbox-group @change.stop="radioChange(item.id)">
|
<checkbox-group @change.stop="radioChange(item.id)">
|
||||||
|
|||||||
@@ -273,7 +273,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -292,7 +292,7 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text>
|
>{{ $formatCount(item.zan) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -272,7 +272,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text>
|
>{{ $formatCount(item.zan) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex" @click="infoClick(item)">
|
<view class="flex" @click="infoClick(item)">
|
||||||
<!-- <image
|
<!-- <image
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
class="icon"
|
class="icon"
|
||||||
/> -->
|
/> -->
|
||||||
<u-icon name="chat" size="24"></u-icon>
|
<u-icon name="chat" size="24"></u-icon>
|
||||||
<text class="seeNum-txt">{{ item.replyCount || 0 }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.replyCount || 0) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
|
||||||
<image
|
<image
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image :src="webUrl + '/20230803152147141807.png'" class="icon" />
|
<image :src="webUrl + '/20230803152147141807.png'" class="icon" />
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -68,12 +68,12 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text
|
>{{ $formatCount(item.zan) }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<u-icon name="chat" size="24"></u-icon>
|
<u-icon name="chat" size="24"></u-icon>
|
||||||
<text class="seeNum-txt">{{ item.replyCount || comments.length }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.replyCount || comments.length) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -33,18 +33,18 @@
|
|||||||
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230547221591.png'"
|
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230547221591.png'"
|
||||||
v-if="item['hasLike']"/>
|
v-if="item['hasLike']"/>
|
||||||
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230552152511.png'" v-else/>
|
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230552152511.png'" v-else/>
|
||||||
<cover-view class="one-t tc">{{ item['likeCount'] }}</cover-view>
|
<cover-view class="one-t tc">{{ $formatCount(item['likeCount']) }}</cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
<cover-view class="flex flex-col ai-center" style="width:78rpx;margin-right: 16rpx;"
|
<cover-view class="flex flex-col ai-center" style="width:78rpx;margin-right: 16rpx;"
|
||||||
@click="changeFav(item)">
|
@click="changeFav(item)">
|
||||||
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230535491918.png'"
|
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230535491918.png'"
|
||||||
v-if="item['hasFavorite']"/>
|
v-if="item['hasFavorite']"/>
|
||||||
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230541207016.png'" v-else/>
|
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230541207016.png'" v-else/>
|
||||||
<cover-view class="one-t tc">{{ item['favoriteCount'] }}</cover-view>
|
<cover-view class="one-t tc">{{ $formatCount(item['favoriteCount']) }}</cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
<cover-view class="flex flex-col ai-center" style="width:78rpx" @click="showDialog=true">
|
<cover-view class="flex flex-col ai-center" style="width:78rpx" @click="showDialog=true">
|
||||||
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230529202260.png'"/>
|
<cover-image style="width: 60rpx;height: 60rpx" :src="webUrl+'/20240113230529202260.png'"/>
|
||||||
<cover-view class="one-t tc">{{ item['replyCount'] }}</cover-view>
|
<cover-view class="one-t tc">{{ $formatCount(item['replyCount']) }}</cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
@close="dialogClose" @open="dialogOpen">
|
@close="dialogClose" @open="dialogOpen">
|
||||||
<view style="z-index: 100">
|
<view style="z-index: 100">
|
||||||
<cover-view class="tc" style="padding: 20rpx 0 40rpx;font-size: 28rpx">{{
|
<cover-view class="tc" style="padding: 20rpx 0 40rpx;font-size: 28rpx">{{
|
||||||
list[current]['replyCount']
|
$formatCount(list[current]['replyCount'])
|
||||||
}}条评论
|
}}条评论
|
||||||
</cover-view>
|
</cover-view>
|
||||||
<scroll-view style="max-height: 740rpx" scroll-y @scrolltolower="fetchReply">
|
<scroll-view style="max-height: 740rpx" scroll-y @scrolltolower="fetchReply">
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
toMessage() {
|
toMessage() {
|
||||||
markMessagesAsRead().then(res => {
|
markMessagesAsRead().then(res => {
|
||||||
|
uni.$emit('updateUnreadMessageCount', 0)
|
||||||
uni.navigateTo({url: '/pkg_common/views/message'})
|
uni.navigateTo({url: '/pkg_common/views/message'})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -120,7 +121,21 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getUnreadMessageCount(item) {
|
getUnreadMessageCount(item) {
|
||||||
getUnreadMessageCount().then(res => {
|
getUnreadMessageCount().then(res => {
|
||||||
this.unreadNum = res.data
|
const count = res.data || 0
|
||||||
|
this.unreadNum = count
|
||||||
|
uni.request({
|
||||||
|
url: this.$SERVICE_API_URL + '/customer-chat-list',
|
||||||
|
method: 'POST',
|
||||||
|
data: {uid: this.uid},
|
||||||
|
success: res => {
|
||||||
|
if (res.data.status_code === 200) {
|
||||||
|
const _count = res.data.content + count
|
||||||
|
uni.$emit('updateUnreadMessageCount', _count)
|
||||||
|
} else {
|
||||||
|
uni.$emit('updateUnreadMessageCount', count)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goRoom(item) {
|
goRoom(item) {
|
||||||
|
|||||||
+117
-18
@@ -175,27 +175,54 @@
|
|||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</view>
|
</view>
|
||||||
<u-form-item prop="typeText">
|
<u-form-item prop="isCountyFamous">
|
||||||
<u-cell title="店铺类型" :border="false" isLink>
|
<u-cell title="县域店铺" :border="false">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<text class="required">*</text>
|
<text class="required">*</text>
|
||||||
</template>
|
</template>
|
||||||
<template #value>
|
<template #value>
|
||||||
<picker
|
<u-radio-group
|
||||||
:value="indexType"
|
v-model="form.isCountyFamous"
|
||||||
:range="columnsType"
|
|
||||||
:disabled="reviewing"
|
:disabled="reviewing"
|
||||||
mode=selector
|
placement="row"
|
||||||
range-key="name"
|
@change="countyFamousChange"
|
||||||
class="picker"
|
|
||||||
@change="typeChange"
|
|
||||||
>
|
>
|
||||||
<u--text v-if="form.typeText" :text="form.typeText"></u--text>
|
<u-radio
|
||||||
<u--text v-else text="请选择类型" color="#c0c4cc"></u--text>
|
:name="0"
|
||||||
</picker>
|
:customStyle="{marginRight: '16px'}"
|
||||||
|
active-color="red"
|
||||||
|
label="否"
|
||||||
|
/>
|
||||||
|
<u-radio
|
||||||
|
:name="1"
|
||||||
|
active-color="red"
|
||||||
|
label="是"
|
||||||
|
/>
|
||||||
|
</u-radio-group>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<u-form-item prop="typeText">
|
||||||
|
<picker
|
||||||
|
:value="indexType"
|
||||||
|
:range="columnsType"
|
||||||
|
:disabled="reviewing"
|
||||||
|
mode="selector"
|
||||||
|
range-key="name"
|
||||||
|
class="picker"
|
||||||
|
@change="typeChange"
|
||||||
|
>
|
||||||
|
<u-cell title="店铺类型" :border="false" isLink>
|
||||||
|
<template #icon>
|
||||||
|
<text class="required">*</text>
|
||||||
|
</template>
|
||||||
|
<template #value>
|
||||||
|
<u--text v-if="form.typeText" :text="form.typeText"></u--text>
|
||||||
|
<u--text v-else text="请选择类型" color="#c0c4cc"></u--text>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</picker>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item prop="contact">
|
<u-form-item prop="contact">
|
||||||
<u-cell title="联系人姓名" :border="false">
|
<u-cell title="联系人姓名" :border="false">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
@@ -316,7 +343,15 @@
|
|||||||
<text class="required">*</text>
|
<text class="required">*</text>
|
||||||
</template>
|
</template>
|
||||||
<template #value>
|
<template #value>
|
||||||
<u--text :text="form.serviceTime + ' - ' + form.serviceEndTime"></u--text>
|
<u--text
|
||||||
|
v-if="form.serviceTime && form.serviceEndTime"
|
||||||
|
:text="form.serviceTime + ' - ' + form.serviceEndTime"
|
||||||
|
></u--text>
|
||||||
|
<u--text
|
||||||
|
v-else
|
||||||
|
text="请选择营业时间"
|
||||||
|
color="#c0c4cc"
|
||||||
|
></u--text>
|
||||||
<tpf-time-range
|
<tpf-time-range
|
||||||
startTime="00:00"
|
startTime="00:00"
|
||||||
endTime="23:59"
|
endTime="23:59"
|
||||||
@@ -414,7 +449,8 @@ import {
|
|||||||
getShopInfo,
|
getShopInfo,
|
||||||
removeApply,
|
removeApply,
|
||||||
saveShop,
|
saveShop,
|
||||||
getHotelInfo
|
getHotelInfo,
|
||||||
|
getCountyFamousHotelType
|
||||||
} from '@/api/join'
|
} from '@/api/join'
|
||||||
import {
|
import {
|
||||||
getCity,
|
getCity,
|
||||||
@@ -449,6 +485,8 @@ export default {
|
|||||||
qualification: '',
|
qualification: '',
|
||||||
type: 0,
|
type: 0,
|
||||||
typeText: '',
|
typeText: '',
|
||||||
|
isCountyFamous: 0,
|
||||||
|
countyFamousHotelType: null,
|
||||||
phone: '',
|
phone: '',
|
||||||
captcha: '',
|
captcha: '',
|
||||||
area: '',
|
area: '',
|
||||||
@@ -483,6 +521,12 @@ export default {
|
|||||||
message: '请上传店铺LOGO',
|
message: '请上传店铺LOGO',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['blur', 'change']
|
||||||
},
|
},
|
||||||
|
'isCountyFamous': {
|
||||||
|
type: 'number',
|
||||||
|
required: true,
|
||||||
|
message: '请选择是否为县域店铺',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
},
|
||||||
'typeText': {
|
'typeText': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -539,6 +583,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
columnsType: [],
|
columnsType: [],
|
||||||
|
hotelTypeList: [],
|
||||||
|
countyFamousHotelTypeList: [],
|
||||||
indexType: [0],
|
indexType: [0],
|
||||||
district: [],
|
district: [],
|
||||||
address: {},
|
address: {},
|
||||||
@@ -574,6 +620,8 @@ export default {
|
|||||||
qualification: '',
|
qualification: '',
|
||||||
type: 0,
|
type: 0,
|
||||||
typeText: '',
|
typeText: '',
|
||||||
|
isCountyFamous: 0,
|
||||||
|
countyFamousHotelType: null,
|
||||||
phone: '',
|
phone: '',
|
||||||
captcha: '',
|
captcha: '',
|
||||||
area: '',
|
area: '',
|
||||||
@@ -646,9 +694,18 @@ export default {
|
|||||||
this.district = data
|
this.district = data
|
||||||
})
|
})
|
||||||
getShopData().then(({data}) => {
|
getShopData().then(({data}) => {
|
||||||
this.columnsType = data.hotelTypeList
|
this.hotelTypeList = data.hotelTypeList || []
|
||||||
|
this.columnsType = this.hotelTypeList
|
||||||
this.notice = data.merchantApplyNotice
|
this.notice = data.merchantApplyNotice
|
||||||
this.initInfo()
|
getCountyFamousHotelType().then(res => {
|
||||||
|
const listData = Array.isArray(res.data)
|
||||||
|
? res.data
|
||||||
|
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
|
||||||
|
this.countyFamousHotelTypeList = listData || []
|
||||||
|
this.initInfo()
|
||||||
|
}).catch(() => {
|
||||||
|
this.initInfo()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -685,6 +742,10 @@ export default {
|
|||||||
// 店铺图片
|
// 店铺图片
|
||||||
this.pics = []
|
this.pics = []
|
||||||
this.form = data.hotelInfo
|
this.form = data.hotelInfo
|
||||||
|
if (!this.form.serviceTime || !this.form.serviceEndTime) {
|
||||||
|
this.form.serviceTime = ''
|
||||||
|
this.form.serviceEndTime = ''
|
||||||
|
}
|
||||||
this.form.coverVideo = this.form.coverType === 2 ? this.form.cover : ''
|
this.form.coverVideo = this.form.coverType === 2 ? this.form.cover : ''
|
||||||
const picsTemp = this.form.pics.split(',')
|
const picsTemp = this.form.pics.split(',')
|
||||||
if (picsTemp.length > 0) {
|
if (picsTemp.length > 0) {
|
||||||
@@ -704,7 +765,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.indexType = this.columnsType.findIndex(item => item.id === this.form.type)
|
if (this.form.isCountyFamous !== 1 && this.form.isCountyFamous !== 0) {
|
||||||
|
this.form.isCountyFamous = 0
|
||||||
|
}
|
||||||
|
if (this.form.isCountyFamous === 1) {
|
||||||
|
this.columnsType = this.countyFamousHotelTypeList
|
||||||
|
this.indexType = this.columnsType.findIndex(item => item.id === this.form.countyFamousHotelType)
|
||||||
|
} else {
|
||||||
|
this.columnsType = this.hotelTypeList
|
||||||
|
this.indexType = this.columnsType.findIndex(item => item.id === this.form.type)
|
||||||
|
}
|
||||||
if (this.indexType !== -1) {
|
if (this.indexType !== -1) {
|
||||||
this.form.typeText = this.columnsType[this.indexType].name
|
this.form.typeText = this.columnsType[this.indexType].name
|
||||||
}
|
}
|
||||||
@@ -767,13 +837,42 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
countyFamousChange(e) {
|
||||||
|
const value = parseInt(e)
|
||||||
|
this.form.isCountyFamous = value
|
||||||
|
if (value === 1) {
|
||||||
|
if (this.countyFamousHotelTypeList.length === 0) {
|
||||||
|
getCountyFamousHotelType().then(res => {
|
||||||
|
const listData = Array.isArray(res.data)
|
||||||
|
? res.data
|
||||||
|
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
|
||||||
|
this.countyFamousHotelTypeList = listData || []
|
||||||
|
this.columnsType = this.countyFamousHotelTypeList
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.columnsType = this.countyFamousHotelTypeList
|
||||||
|
}
|
||||||
|
this.indexType = 0
|
||||||
|
this.form.typeText = ''
|
||||||
|
this.form.countyFamousHotelType = null
|
||||||
|
} else {
|
||||||
|
this.columnsType = this.hotelTypeList
|
||||||
|
this.indexType = 0
|
||||||
|
this.form.typeText = ''
|
||||||
|
this.form.type = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
typeChange(e) {
|
typeChange(e) {
|
||||||
const idx = parseInt(e.detail.value)
|
const idx = parseInt(e.detail.value)
|
||||||
this.columnsType.map((item, index) => {
|
this.columnsType.map((item, index) => {
|
||||||
if (index === idx) {
|
if (index === idx) {
|
||||||
this.form.typeText = item.name
|
this.form.typeText = item.name
|
||||||
this.indexType = index
|
this.indexType = index
|
||||||
this.form.type = item.id
|
if (this.form.isCountyFamous === 1) {
|
||||||
|
this.form.countyFamousHotelType = item.id
|
||||||
|
} else {
|
||||||
|
this.form.type = item.id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,6 +36,21 @@
|
|||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<u-form-item prop="businessLicense">
|
||||||
|
<u-cell title="营业执照名称" :border="false">
|
||||||
|
<template #icon>
|
||||||
|
<text class="required">*</text>
|
||||||
|
</template>
|
||||||
|
<template #value>
|
||||||
|
<u-input
|
||||||
|
v-model="formSupplier.businessLicense"
|
||||||
|
:disabled="reviewing"
|
||||||
|
border="none"
|
||||||
|
placeholder="请填写营业执照名称"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item prop="avatar">
|
<u-form-item prop="avatar">
|
||||||
<u-cell title="头像" :border="false">
|
<u-cell title="头像" :border="false">
|
||||||
<template #label>
|
<template #label>
|
||||||
@@ -555,6 +570,7 @@ export default {
|
|||||||
quaPics: [],
|
quaPics: [],
|
||||||
formSupplier: {
|
formSupplier: {
|
||||||
name: '',
|
name: '',
|
||||||
|
businessLicense: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
contact: '',
|
contact: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
@@ -590,6 +606,12 @@ export default {
|
|||||||
message: '请填写供应商名称',
|
message: '请填写供应商名称',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['blur', 'change']
|
||||||
},
|
},
|
||||||
|
'businessLicense': {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '请填写营业执照名称',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
},
|
||||||
'contact': {
|
'contact': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
@@ -769,6 +791,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.formSupplier = !this.reviewing && local || {
|
this.formSupplier = !this.reviewing && local || {
|
||||||
name: '',
|
name: '',
|
||||||
|
businessLicense: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
contact: '',
|
contact: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
|
|||||||
@@ -21,6 +21,22 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="form-item v12-mt-2">
|
||||||
|
<view class="title">
|
||||||
|
<text class="required">* </text>
|
||||||
|
营业执照名称:
|
||||||
|
</view>
|
||||||
|
<view class="input">
|
||||||
|
<u-textarea
|
||||||
|
border="none"
|
||||||
|
:disabled="form.isDraft === 0 && (form.reviewStatus === 0 || form.reviewStatus === 1)"
|
||||||
|
placeholder="请输入营业执照名称"
|
||||||
|
:placeholder-style="inputPlaceholderStyle"
|
||||||
|
v-model="form.businessLicense"
|
||||||
|
autoHeight
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="form-item v12-mt-2 v12-d-flex v12-justify-start">
|
<view class="form-item v12-mt-2 v12-d-flex v12-justify-start">
|
||||||
<view>
|
<view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
@@ -580,6 +596,10 @@ export default {
|
|||||||
uni.$u.toast('请输入名称')
|
uni.$u.toast('请输入名称')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.form.businessLicense) {
|
||||||
|
uni.$u.toast('请输入营业执照名称')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!this.form.cover) {
|
if (!this.form.cover) {
|
||||||
uni.$u.toast('请上传主图')
|
uni.$u.toast('请上传主图')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -265,6 +265,12 @@ export default {
|
|||||||
message: '请填写批发商名称',
|
message: '请填写批发商名称',
|
||||||
trigger: ['blur', 'change']
|
trigger: ['blur', 'change']
|
||||||
},
|
},
|
||||||
|
'businessLicense': {
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
message: '请填写营业执照名称',
|
||||||
|
trigger: ['blur', 'change']
|
||||||
|
},
|
||||||
'contact': {
|
'contact': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@@ -64,11 +64,11 @@
|
|||||||
<view class="zan-box flex flex-0 ai-end" @click="zanInn">
|
<view class="zan-box flex flex-0 ai-end" @click="zanInn">
|
||||||
<template v-if="isLike">
|
<template v-if="isLike">
|
||||||
<image :src="webUrl + '/icon/icon-like.png'" class="img" />
|
<image :src="webUrl + '/icon/icon-like.png'" class="img" />
|
||||||
<text class="on">{{ inn.zan }}</text>
|
<text class="on">{{ $formatCount(inn.zan) }}</text>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<image :src="webUrl + '/icon/icon-like.png'" class="img" />
|
<image :src="webUrl + '/icon/icon-like.png'" class="img" />
|
||||||
<text>{{ inn.zan }}</text>
|
<text>{{ $formatCount(inn.zan) }}</text>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex flex-0 ai-end favorite-box" @click="doneFavorite">
|
<view class="flex flex-0 ai-end favorite-box" @click="doneFavorite">
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text>{{ favoriteCount }}</text>
|
<text>{{ $formatCount(favoriteCount) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -217,7 +217,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -236,12 +236,12 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.hasZan ? 'on' : ''"
|
:class="item.hasZan ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text>
|
>{{ $formatCount(item.zan) }}</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex" @click="infoClick(item)">
|
<view class="flex" @click="infoClick(item)">
|
||||||
<u-icon name="chat" size="24"></u-icon>
|
<u-icon name="chat" size="24"></u-icon>
|
||||||
<text class="seeNum-txt">{{ item.replyCount || 0}}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.replyCount) || 0}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -552,6 +552,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="village-wrap v12-pt-3">
|
<view class="village-wrap v12-pt-3">
|
||||||
|
<view class="v12-pa-2 sale-wrap">
|
||||||
|
<view
|
||||||
|
v-for="(type, typeIndex) in shopTypeList"
|
||||||
|
:key="typeIndex"
|
||||||
|
:class="{ saleActive: shopTypeActive === type.id }"
|
||||||
|
@click="handleShopType(type)"
|
||||||
|
>
|
||||||
|
{{ type.name }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view v-if="shopList.length > 0" class="village-list">
|
<view v-if="shopList.length > 0" class="village-list">
|
||||||
<view
|
<view
|
||||||
v-for="(shop, shopIndex) in shopList"
|
v-for="(shop, shopIndex) in shopList"
|
||||||
@@ -876,7 +886,8 @@ import {
|
|||||||
getSaleList,
|
getSaleList,
|
||||||
getJiaLouList,
|
getJiaLouList,
|
||||||
getCityNewsCategory,
|
getCityNewsCategory,
|
||||||
getCityShopList
|
getCityShopList,
|
||||||
|
getCountyFamousHotelType
|
||||||
} from '@/api/qianxian'
|
} from '@/api/qianxian'
|
||||||
import ProductWindow from '@/components/ProductWindow'
|
import ProductWindow from '@/components/ProductWindow'
|
||||||
import goCartMixin from '@/mixins/goCartMixins'
|
import goCartMixin from '@/mixins/goCartMixins'
|
||||||
@@ -966,6 +977,8 @@ export default {
|
|||||||
newsCategoryList: [],
|
newsCategoryList: [],
|
||||||
newsCurrent: 0,
|
newsCurrent: 0,
|
||||||
shopList: [],
|
shopList: [],
|
||||||
|
shopTypeList: [],
|
||||||
|
shopTypeActive: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@@ -1641,7 +1654,7 @@ export default {
|
|||||||
industryTabItemClick(index) {
|
industryTabItemClick(index) {
|
||||||
if (index === this.industryTabIndex) return
|
if (index === this.industryTabIndex) return
|
||||||
this.industryTabIndex = index
|
this.industryTabIndex = index
|
||||||
if(index === 2) {
|
if (index === 2) {
|
||||||
const params = {
|
const params = {
|
||||||
countyId: this.countyId,
|
countyId: this.countyId,
|
||||||
shopType: 'countyFamous',
|
shopType: 'countyFamous',
|
||||||
@@ -1649,23 +1662,44 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999
|
limit: 9999
|
||||||
}
|
}
|
||||||
console.log(this.inn);
|
|
||||||
|
|
||||||
getJiaLouList(params).then(res => {
|
getJiaLouList(params).then(res => {
|
||||||
this.jiaLouList = res.data.records || []
|
this.jiaLouList = res.data.records || []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(index === 1) {
|
if (index === 1) {
|
||||||
const params = {
|
this.shopTypeActive = ''
|
||||||
countyFamousDataId: this.id,
|
if (this.shopTypeList.length === 0) {
|
||||||
page: 1,
|
this.getShopTypeList()
|
||||||
limit: 9999
|
|
||||||
}
|
}
|
||||||
getCityShopList(params).then(res => {
|
this.getShopList()
|
||||||
this.shopList = res.data.records || []
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getShopTypeList() {
|
||||||
|
getCountyFamousHotelType().then(res => {
|
||||||
|
const listData = Array.isArray(res.data)
|
||||||
|
? res.data
|
||||||
|
: (res.data && (res.data.hotelTypeList || res.data.list || res.data.records)) || []
|
||||||
|
this.shopTypeList = [{ name: '全部', id: '' }].concat(listData || [])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getShopList() {
|
||||||
|
const params = {
|
||||||
|
countyFamousDataId: this.id,
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
}
|
||||||
|
if (this.shopTypeActive) {
|
||||||
|
params.countyFamousHotelType = this.shopTypeActive
|
||||||
|
}
|
||||||
|
getCityShopList(params).then(res => {
|
||||||
|
this.shopList = (res.data && (res.data.records || res.data.list)) || []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleShopType(type) {
|
||||||
|
if (this.shopTypeActive === type.id) return
|
||||||
|
this.shopTypeActive = type.id
|
||||||
|
this.getShopList()
|
||||||
|
},
|
||||||
fileItemClick(file) {
|
fileItemClick(file) {
|
||||||
const url = file.attachment || ''
|
const url = file.attachment || ''
|
||||||
if (!url) return
|
if (!url) return
|
||||||
|
|||||||
@@ -52,11 +52,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="intro-text v12-mt-2">* 下单后与商家确认入住时间</view>
|
<view class="intro-text v12-mt-2">* 下单后与商家确认入住时间</view>
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-2">
|
<view class="v12-justify-between v12-align-center v12-mt-2">
|
||||||
<view class="v12-primary v12-white-text v12-font-30 date-item v12-px-1" style="height: 160rpx;">
|
<view @click="handleDate" class="v12-primary v12-white-text v12-font-30 date-item v12-px-1" style="height: 160rpx;">
|
||||||
<view>预</view>
|
<view>预</view>
|
||||||
<view>约</view>
|
<view>约</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-for="(d) in currentWeek" :key="d.date" class="date-item" style="width: 74rpx;">
|
<view v-for="(d) in currentWeek" @click="handleDate" :key="d.date" class="date-item" style="width: 74rpx;">
|
||||||
<view>{{ d.week }}</view>
|
<view>{{ d.week }}</view>
|
||||||
<view class="v12-my-1 v12-primary-text">{{ d.monthDay }}</view>
|
<view class="v12-my-1 v12-primary-text">{{ d.monthDay }}</view>
|
||||||
<view>{{ d.status }}</view>
|
<view>{{ d.status }}</view>
|
||||||
@@ -308,6 +308,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDateSelected(dateRange) {
|
handleDateSelected(dateRange) {
|
||||||
this.dateRange = dateRange
|
this.dateRange = dateRange
|
||||||
|
this.showAgreementPopup = true
|
||||||
},
|
},
|
||||||
handleDate() {
|
handleDate() {
|
||||||
this.showDatePicker = true
|
this.showDatePicker = true
|
||||||
|
|||||||
+305
-440
@@ -1,498 +1,312 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="health-foods">
|
<view class="health-foods">
|
||||||
<view class="v12-justify-center">
|
<view
|
||||||
<view
|
class="banner-wrap"
|
||||||
class="ys-btn v12-mr-3 v12-radius-100 v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold"
|
v-if="topImageConfig && topImageConfig.backgroundImage"
|
||||||
@click="toSanctun"
|
>
|
||||||
>养生胜地</view
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold"
|
|
||||||
>养生食材</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-5">
|
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/orderIcon/map_dark.png'"
|
:src="topImageConfig.backgroundImage"
|
||||||
|
class="banner-img"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="icon"
|
|
||||||
/>
|
/>
|
||||||
<view class="v12-font-28 v12-secondary-dark-text v12-mr-3">{{
|
<view class="banner-tabs v12-justify-center">
|
||||||
cityName
|
<image
|
||||||
}}</view>
|
class="tab-btn v12-mr-3"
|
||||||
<view class="flex-1">
|
:src="travelButtonSrc"
|
||||||
<u-search
|
mode="widthFix"
|
||||||
:showAction="false"
|
@click="toSanctun"
|
||||||
v-model="keyword"
|
/>
|
||||||
bgColor="#fff"
|
<image
|
||||||
searchIconColor="#C52733"
|
class="tab-btn"
|
||||||
@search="search"
|
:src="wellnessButtonSrc"
|
||||||
></u-search>
|
mode="widthFix"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<swiper
|
<!-- <view class="v12-justify-center v12-mt-3" v-if="hasRankData">
|
||||||
class="v12-justify-between swap"
|
|
||||||
autoplay
|
|
||||||
circular
|
|
||||||
next-margin="300rpx"
|
|
||||||
duration="10000"
|
|
||||||
interval="3000"
|
|
||||||
>
|
|
||||||
<swiper-item v-for="(item, index) in foodItems" :key="index" @click="toDetails(item.id)">
|
|
||||||
<view class="trave-item-wrap v12-mr-3 v12-mt-3">
|
|
||||||
<view class="trave-item">
|
|
||||||
<image
|
|
||||||
class="trave-item"
|
|
||||||
mode="widthFix"
|
|
||||||
:src="item.indexImage"
|
|
||||||
></image>
|
|
||||||
</view>
|
|
||||||
<view class="trave-btn">
|
|
||||||
<text class="one-t">{{ item.name }}</text>
|
|
||||||
<image
|
|
||||||
:src="webUrl + '/orderIcon/arrow.png'"
|
|
||||||
class="arrow-icon v12-ml-1"
|
|
||||||
></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
<view class="v12-justify-center v12-mt-3" v-if="hasRankData">
|
|
||||||
<image
|
<image
|
||||||
class="title-img"
|
class="title-img"
|
||||||
:src="webUrl + '/orderIcon/rankTitle.png'"
|
:src="webUrl + '/orderIcon/rankTitle.png'"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="rank-wrap v12-mt-3" v-if="hasRankData">
|
<!-- <vi
|
||||||
<view class="rank-items-wrap">
|
<view
|
||||||
<view class="bee-rank" v-for="(k, i) in rank" :key="i">
|
class="rank-item v12-justify-start v12-align-center v12-mb-4"
|
||||||
<image :src="k.backgroundImage" class="bg-img" style="width:inherit" mode="scaleToFill"></image>
|
v-for="(item, index) in k.products"
|
||||||
<view class="rank-title-wrap">
|
@click="toGoods(item.productId)"
|
||||||
<view class="rank-title v12-font-34 v12-font-bold one-t">{{
|
:key="index"
|
||||||
k.title
|
>
|
||||||
}}</view>
|
<view
|
||||||
</view>
|
class="rank-tag"
|
||||||
<view class="v12-px-2">
|
:class="{ 'rank2-bg': index === 1, 'rank3-bg': index === 2 }"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="rank-2"
|
||||||
|
:class="{
|
||||||
|
'rank2-2-bg': index === 1,
|
||||||
|
'rank3-3-bg': index === 2,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<view
|
<view
|
||||||
class="rank-item v12-justify-start v12-align-center v12-mb-4"
|
class="rank-3"
|
||||||
v-for="(item, index) in k.products"
|
:class="{
|
||||||
@click="toGoods(item.productId)"
|
'rank2-4-bg': index === 1,
|
||||||
:key="index"
|
'rank3-4-bg': index === 2,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="rank-tag"
|
class="rank-4"
|
||||||
:class="{ 'rank2-bg': index === 1, 'rank3-bg': index === 2 }"
|
:class="{
|
||||||
|
'rank2-bg': index === 1,
|
||||||
|
'rank3-bg': index === 2,
|
||||||
|
}"
|
||||||
|
>{{ index + 1 }}</view
|
||||||
>
|
>
|
||||||
<view
|
|
||||||
class="rank-2"
|
|
||||||
:class="{
|
|
||||||
'rank2-2-bg': index === 1,
|
|
||||||
'rank3-3-bg': index === 2,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="rank-3"
|
|
||||||
:class="{
|
|
||||||
'rank2-4-bg': index === 1,
|
|
||||||
'rank3-4-bg': index === 2,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="rank-4"
|
|
||||||
:class="{
|
|
||||||
'rank2-bg': index === 1,
|
|
||||||
'rank3-bg': index === 2,
|
|
||||||
}"
|
|
||||||
>{{ index + 1 }}</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="rank-img">
|
|
||||||
<image
|
|
||||||
:src="item.productImage"
|
|
||||||
mode="widthFix"
|
|
||||||
class="rank-img"
|
|
||||||
></image>
|
|
||||||
</view>
|
|
||||||
<view class="v12-ml-2">
|
|
||||||
<view
|
|
||||||
class="v12-font-bold v12-font-24 one-t"
|
|
||||||
style="width: 160rpx"
|
|
||||||
>{{ item.productTitle }}</view
|
|
||||||
>
|
|
||||||
<view class="v12-font-22 more-t">{{ item.productDesc }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="rank-img">
|
||||||
</view>
|
|
||||||
<view class="recommend-wrap v12-mt-3">
|
|
||||||
<view class="recommend-title v12-px-3">
|
|
||||||
<text class="v12-dark-text v12-font-36 v12-font-bold">食补推荐</text>
|
|
||||||
<view class="slider"></view>
|
|
||||||
</view>
|
|
||||||
<view class="recommends v12-mt-3">
|
|
||||||
<view
|
|
||||||
class="recommend-item"
|
|
||||||
v-for="(item, index) in recommendItems"
|
|
||||||
:key="index"
|
|
||||||
@click="toGoods(item.productId)"
|
|
||||||
>
|
|
||||||
<view>
|
|
||||||
<view class="recommend-img">
|
|
||||||
<image class="recommend-img" :src="item.image" mode="aspectFit"></image>
|
|
||||||
<view class="name-wrap v12-white-text v12-text-center more-t">{{
|
|
||||||
item.title
|
|
||||||
}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="v12-px-2 v12-font-bold v12-font-28 more-t v12-my-2">{{
|
|
||||||
item.productName
|
|
||||||
}}</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="v12-justify-between v12-primary-text v12-font-bold v12-px-2 v12-pb-2"
|
|
||||||
>
|
|
||||||
<view class="">
|
|
||||||
<text class="v12-font-32">¥</text>
|
|
||||||
<text class="v12-font-36">{{ item.price }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="cart-img" @click.stop="addToCart(item, 'productId')">
|
|
||||||
<image
|
|
||||||
class="cart-img"
|
|
||||||
:src="webUrl + '/orderIcon/组 355.png'"
|
|
||||||
></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="recommendItems.length === 0">
|
|
||||||
<view class="no-data-wrap v12-justify-center v12-mt-6">
|
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/orderIcon/微信图片_20241009220552.png'"
|
:src="item.productImage"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
|
class="rank-img"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="v12-ml-2">
|
||||||
|
<view
|
||||||
|
class="v12-font-bold v12-font-24 one-t"
|
||||||
|
style="width: 160rpx"
|
||||||
|
>{{ item.productTitle }}</view
|
||||||
|
>
|
||||||
|
<view class="v12-font-22 more-t">{{ item.productDesc }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="v12-justify-between v12-align-center v12-px-3 tabs-wrap">
|
||||||
|
<view
|
||||||
|
class="tab v12-font-34 v12-dark-text v12-mr-5"
|
||||||
|
v-for="(tab, index) in tabs"
|
||||||
|
@click="handleTab(index,tab)"
|
||||||
|
:class="{'activeTab' : index === actived}"
|
||||||
|
:key="index">
|
||||||
|
<text>{{ tab.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between sanctup-items v12-mt-3">
|
||||||
|
<view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item)">
|
||||||
|
<view class="img">
|
||||||
|
<video
|
||||||
|
class="img"
|
||||||
|
:src="item.cover"
|
||||||
|
:play-btn-position="'center'"
|
||||||
|
:show-fullscreen-btn="false"
|
||||||
|
:show-center-play-btn="false"
|
||||||
|
:show-play-btn="false"
|
||||||
|
:controls="false"
|
||||||
|
:poster="item.cover + '?vframe/jpg/offset/1'"
|
||||||
|
v-if="item.coverType === 2">
|
||||||
|
</video>
|
||||||
|
<image v-else class="img" :src="item.cover"></image>
|
||||||
|
<view class="v12-white-text address">
|
||||||
|
<image
|
||||||
|
class="map-icon v12-mr-1"
|
||||||
|
:src="webUrl + '/orderIcon/map_white.png'"
|
||||||
|
></image>
|
||||||
|
<text class="v12-font-28">{{ item.areaName }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.intro" class="v12-font-bold v12-font-28 v12-mt-1 more-t desc-txt">{{ item.intro }}</view>
|
||||||
|
<view class="v12-justify-start v12-align-center v12-my-1">
|
||||||
|
<view class="atr">
|
||||||
|
<image class="atr" :src="item.avatar"></image>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="items.length === 0" class="v12-justify-center v12-mt-6">
|
||||||
|
<view class="no-data-wrap">
|
||||||
|
<image :src="webUrl + '/orderIcon/微信图片_20241009220552.png'" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<ProductWindow
|
|
||||||
ref="attrWindow"
|
|
||||||
:attr="attr"
|
|
||||||
:cartNum="cart_num"
|
|
||||||
:showOk="true"
|
|
||||||
@changeFun="changeFun"
|
|
||||||
@ok="handleOk"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getRank, getFoods, getRecipe } from "@/api/health";
|
import { getCategory,getWellnessPlace } from '@/api/health'
|
||||||
import ProductWindow from '@/components/ProductWindow'
|
import { getJiaLouList } from '@/api/qianxian'
|
||||||
import goCartMixin from '@/mixins/goCartMixins'
|
import { getWellnessTopImage } from '@/api/health'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
ProductWindow
|
|
||||||
},
|
|
||||||
mixins: [goCartMixin],
|
|
||||||
computed: {
|
|
||||||
hasRankData() {
|
|
||||||
if (!Array.isArray(this.rank)) return false;
|
|
||||||
const hasText = (v) => typeof v === "string" && v.trim() !== "";
|
|
||||||
const hasValue = (v) => v !== null && v !== undefined && v !== "";
|
|
||||||
return this.rank.some((item) => {
|
|
||||||
if (!item) return false;
|
|
||||||
if (hasText(item.title) || hasText(item.backgroundImage)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (Array.isArray(item.products)) {
|
|
||||||
return item.products.some((p) => {
|
|
||||||
if (!p) return false;
|
|
||||||
return (
|
|
||||||
hasText(p.productTitle) ||
|
|
||||||
hasText(p.productDesc) ||
|
|
||||||
hasValue(p.productImage) ||
|
|
||||||
hasValue(p.productId)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
foodItems: [],
|
tabs: [],
|
||||||
recommendItems: [],
|
items: [],
|
||||||
cityId: "",
|
traveItems: [],
|
||||||
cityName: "",
|
actived: 0,
|
||||||
keyword: "",
|
cityId: '',
|
||||||
rank: [],
|
cityName: '',
|
||||||
};
|
categoryId: null,
|
||||||
|
topImageConfig: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
travelButtonSrc() {
|
||||||
|
const config = this.topImageConfig || {}
|
||||||
|
return config.travelButtonImage || config.travelButtonImage || ''
|
||||||
|
},
|
||||||
|
wellnessButtonSrc() {
|
||||||
|
const config = this.topImageConfig || {}
|
||||||
|
return config.wellnessButtonImageFocus || config.wellnessButtonImage || ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.cityId = opts.city;
|
console.log(opts);
|
||||||
this.cityName = decodeURIComponent(opts.cityName);
|
|
||||||
this.getRank();
|
this.cityId = opts.city
|
||||||
this.getList();
|
this.cityName = decodeURIComponent(decodeURIComponent(opts.cityName))
|
||||||
this.getRecipeList();
|
getCategory().then(res => {
|
||||||
|
this.tabs = res.data
|
||||||
|
this.categoryId = res.data[0].id
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
this.getTop()
|
||||||
|
this.getTopImage()
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
// uni.navigateBack({
|
||||||
|
// delta: 0
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toGoods(id) {
|
handleTab(index, tab) {
|
||||||
this.$yrouter.push({
|
this.actived = index
|
||||||
path: "/pages/shop/GoodsCon/index",
|
this.categoryId = tab.id
|
||||||
query: {
|
this.getList()
|
||||||
id: id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
toSanctun() {
|
toSanctun() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url:
|
url: '/pkg_product/views/healthSanctum?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
"/pkg_product/views/healthSanctum?city=" +
|
})
|
||||||
this.cityId +
|
|
||||||
"&cityName=" +
|
|
||||||
this.cityName,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getRecipeList() {
|
toFoods() {
|
||||||
getRecipe().then((res) => {
|
uni.redirectTo({
|
||||||
// console.log(res);
|
url: '/pkg_product/views/healthFoods?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
this.foodItems = res.data.records;
|
})
|
||||||
});
|
|
||||||
},
|
|
||||||
toDetails(id) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pkg_product/views/healthFoodDetails?id=" + id,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getRank() {
|
|
||||||
let params = {
|
|
||||||
goodCityId: this.cityId,
|
|
||||||
};
|
|
||||||
getRank(params).then((res) => {
|
|
||||||
this.rank = res.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
const params = {
|
const params = {
|
||||||
|
// countyId: this.cityId,
|
||||||
goodCityId: this.cityId,
|
goodCityId: this.cityId,
|
||||||
keyword: this.keyword,
|
wellnessPlaceCateId : this.categoryId,
|
||||||
|
shopType: 'wellnessCate',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999,
|
limit: 9999
|
||||||
};
|
}
|
||||||
getFoods(params).then((res) => {
|
getJiaLouList(params).then(res => {
|
||||||
this.recommendItems = res.data.records;
|
// console.log(res);
|
||||||
});
|
this.items = res.data.records
|
||||||
|
})
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.getList();
|
uni.navigateTo({
|
||||||
|
url: '/pkg_product/views/healthSearch?city=' + this.cityId + '&cityName=' + this.cityName
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
getTop() {
|
||||||
};
|
const params = {
|
||||||
|
goodCityId: this.cityId,
|
||||||
|
shopType: 'wellnessTop',
|
||||||
|
page: 1,
|
||||||
|
limit: 9999
|
||||||
|
}
|
||||||
|
getJiaLouList(params).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
this.traveItems = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toStore(item) {
|
||||||
|
if(item.dataType === 'wellnessPlace'){
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: '/pagesInn/inn/innHome',
|
||||||
|
query: {
|
||||||
|
id: item.hotelId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({ url: '/pkg_product/views/sojoumStore?id=' + item.id })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getTopImage() {
|
||||||
|
const cached = uni.getStorageSync('wellnessTopImageConfig')
|
||||||
|
if (cached) {
|
||||||
|
this.topImageConfig = cached
|
||||||
|
}
|
||||||
|
getWellnessTopImage().then(res => {
|
||||||
|
this.topImageConfig = res.data || {}
|
||||||
|
uni.setStorageSync('wellnessTopImageConfig', this.topImageConfig)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.arrow-icon {
|
.health-foods{
|
||||||
|
background: #fff;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.banner-wrap{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.banner-img{
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
.banner-tabs{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.tab-btn{
|
||||||
|
width: 200rpx;
|
||||||
|
will-change: transform;
|
||||||
|
display: block;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.tabs-wrap{
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: scroll;
|
||||||
|
.tab:last-child{
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.map-icon{
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
}
|
||||||
|
.arrow-icon{
|
||||||
width: 25rpx;
|
width: 25rpx;
|
||||||
height: 25rpx;
|
height: 25rpx;
|
||||||
}
|
}
|
||||||
.icon {
|
.icon{
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
}
|
}
|
||||||
.rank2-bg {
|
.flex-1{
|
||||||
background-color: #ecdad6 !important;
|
|
||||||
}
|
|
||||||
.rank3-bg {
|
|
||||||
background-color: #dae3f3 !important;
|
|
||||||
}
|
|
||||||
.rank3-3-bg {
|
|
||||||
background-color: #c8c8c8 !important;
|
|
||||||
}
|
|
||||||
.rank2-2-bg {
|
|
||||||
background-color: #d3b9b2 !important;
|
|
||||||
}
|
|
||||||
.rank2-4-bg {
|
|
||||||
background-color: #ad8578 !important;
|
|
||||||
}
|
|
||||||
.rank3-4-bg {
|
|
||||||
background-color: #a5a5a5 !important;
|
|
||||||
}
|
|
||||||
.rank-2 {
|
|
||||||
width: 40rpx; /* 宽度 */
|
|
||||||
height: 45rpx; /* 高度,根据正六边形的几何特性计算 */
|
|
||||||
background-color: #ddc76f; /* 背景颜色 */
|
|
||||||
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.rank-3 {
|
|
||||||
width: 30rpx; /* 宽度 */
|
|
||||||
height: 35rpx; /* 高度,根据正六边形的几何特性计算 */
|
|
||||||
background-color: #ad9161; /* 背景颜色 */
|
|
||||||
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.rank-4 {
|
|
||||||
width: 25rpx; /* 宽度 */
|
|
||||||
height: 28rpx; /* 高度,根据正六边形的几何特性计算 */
|
|
||||||
background-color: #fff3c2; /* 背景颜色 */
|
|
||||||
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.ys-btn {
|
|
||||||
background: #e2d7c3;
|
|
||||||
}
|
|
||||||
.cart-img {
|
|
||||||
width: 48rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.bg-img {
|
|
||||||
position: absolute;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.recommends {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
grid-column-gap: 20rpx;
|
|
||||||
grid-row-gap: 20rpx;
|
|
||||||
}
|
|
||||||
.recommend-img {
|
|
||||||
width: 344rpx;
|
|
||||||
height: 344rpx;
|
|
||||||
background: #333;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.name-wrap {
|
|
||||||
position: absolute;
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
width: 100%;
|
|
||||||
padding: 8px 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 70rpx;
|
|
||||||
}
|
|
||||||
.recommend-item {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
.recommend-title {
|
|
||||||
position: relative;
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
.slider {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 6rpx;
|
|
||||||
background: linear-gradient(
|
|
||||||
to right,
|
|
||||||
#c52733 0%,
|
|
||||||
rgba(255, 255, 255, 0) 100%
|
|
||||||
);
|
|
||||||
border-radius: 6rpx;
|
|
||||||
bottom: 5rpx;
|
|
||||||
}
|
|
||||||
.rank-wrap {
|
|
||||||
background: #e2bc8d;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
}
|
|
||||||
.rank-tag {
|
|
||||||
width: 50rpx; /* 宽度 */
|
|
||||||
height: 55rpx; /* 高度,根据正六边形的几何特性计算 */
|
|
||||||
background-color: #fbeeb7; /* 背景颜色 */
|
|
||||||
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 20rpx;
|
|
||||||
line-height: 55rpx;
|
|
||||||
top: -22.5rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
.rank-img {
|
|
||||||
min-width: 104rpx;
|
|
||||||
width: 104rpx;
|
|
||||||
height: 104rpx;
|
|
||||||
background: #666;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
}
|
|
||||||
.bee-rank,
|
|
||||||
.drug-rank {
|
|
||||||
width: 100%;
|
|
||||||
background: #999;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.rank-title-wrap {
|
|
||||||
height: 140rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.rank-title {
|
|
||||||
width: 200rpx;
|
|
||||||
padding: 10rpx 5rpx;
|
|
||||||
background: linear-gradient(
|
|
||||||
to right,
|
|
||||||
#ffffff 0%,
|
|
||||||
rgba(255, 255, 255, 0) 100%
|
|
||||||
);
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
.rank-items-wrap {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
grid-column-gap: 20rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.rank-item {
|
|
||||||
width: 100%;
|
|
||||||
height: 116rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
padding: 0 10rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.title-img {
|
|
||||||
width: 404rpx;
|
|
||||||
}
|
|
||||||
.health-foods {
|
|
||||||
min-height: 100vh;
|
|
||||||
background-color: #faeed8;
|
|
||||||
padding: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
.flex-1 {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.swap {
|
.swap{
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.trave-item-wrap {
|
.trave-item-wrap{
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.trave-btn {
|
.trave-btn{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -500,20 +314,71 @@ export default {
|
|||||||
bottom: 30rpx;
|
bottom: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 212rpx;
|
width: 212rpx;
|
||||||
background: rgba(255, 255, 255, 0.7);
|
background: rgba(255,255,255,0.7);
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
padding: 10rpx 20rpx;
|
padding: 10rpx 20rpx;
|
||||||
|
}
|
||||||
|
.trave-item{
|
||||||
|
width: 382rpx;
|
||||||
|
height: 272rpx;
|
||||||
|
background: rgba(230,178,178,0.39);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.desc-txt {
|
||||||
|
height: 78rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.address{
|
||||||
|
position: absolute;
|
||||||
|
left: 30rpx;
|
||||||
|
bottom: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.trave-item {
|
.sanctup-items{
|
||||||
width: 382rpx;
|
display: grid;
|
||||||
height: 272rpx;
|
grid-template-columns: 50% 50%;
|
||||||
background: rgba(230, 178, 178, 0.39);
|
}
|
||||||
border-radius: 20rpx;
|
.atr{
|
||||||
overflow: hidden;
|
width: 52rpx;
|
||||||
|
height: 52rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.img{
|
||||||
|
width: 320rpx;
|
||||||
|
height: 320rpx;
|
||||||
|
// background: #707070;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.sanctum-wrap{
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20rpx ;
|
||||||
|
}
|
||||||
|
.tab{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.slider{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 6rpx;
|
||||||
|
background: linear-gradient(to right, #C52733 0%, rgba(255,255,255,0) 100%);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
bottom: 5rpx;
|
||||||
|
}
|
||||||
|
.activeTab{
|
||||||
|
font-size: 34rpx;
|
||||||
|
background: #C52733;
|
||||||
|
color: #fff !important;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
padding: 4rpx 20rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="sanctum-wrap">
|
<view class="sanctum-wrap">
|
||||||
<view class="v12-justify-center">
|
|
||||||
|
<!-- <view class="v12-justify-center">
|
||||||
<view class="v12-mr-3 v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold">养生胜地</view>
|
<view class="v12-mr-3 v12-radius-100 v12-primary v12-white-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold">养生胜地</view>
|
||||||
<view class="v12-radius-100 v12-grey v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" @click="toFoods">养生食材</view>
|
<view class="v12-radius-100 v12-grey v12-dark-text v12-px-5 v12-py-2 v12-font-28 v12-font-bold" @click="toFoods">养生食材</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="banner-tabs v12-justify-center">
|
||||||
|
<image
|
||||||
|
class="tab-btn v12-mr-3"
|
||||||
|
:src="travelButtonSrc"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
class="tab-btn"
|
||||||
|
:src="wellnessButtonSrc"
|
||||||
|
mode="widthFix"
|
||||||
|
@click="toFoods"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-5">
|
<view class="v12-justify-between v12-align-center v12-mt-5">
|
||||||
<image
|
<image
|
||||||
@@ -38,7 +52,7 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="v12-justify-between v12-align-center v12-px-3 v12-mt-3 tabs-wrap">
|
<view class="v12-justify-between v12-align-center v12-px-3 v12-mt-3 tabs-wrap">
|
||||||
<view
|
<!-- <view
|
||||||
class="tab v12-font-34 v12-dark-text v12-mr-5"
|
class="tab v12-font-34 v12-dark-text v12-mr-5"
|
||||||
v-for="(tab, index) in tabs"
|
v-for="(tab, index) in tabs"
|
||||||
@click="handleTab(index,tab)"
|
@click="handleTab(index,tab)"
|
||||||
@@ -46,7 +60,8 @@
|
|||||||
:key="index">
|
:key="index">
|
||||||
<text>{{ tab.name }}</text>
|
<text>{{ tab.name }}</text>
|
||||||
<view :class="{'slider': index === actived}"></view>
|
<view :class="{'slider': index === actived}"></view>
|
||||||
</view>
|
</view> -->
|
||||||
|
<text class=" v12-font-34 v12-dark-text v12-mr-5 v12-font-bold">大家都在看</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between sanctup-items v12-mt-3">
|
<view class="v12-justify-between sanctup-items v12-mt-3">
|
||||||
<view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item)">
|
<view v-for="(item, index) in items" :key="index" class="v12-pa-1" @click="toStore(item)">
|
||||||
@@ -90,6 +105,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getCategory,getWellnessPlace } from '@/api/health'
|
import { getCategory,getWellnessPlace } from '@/api/health'
|
||||||
import { getJiaLouList } from '@/api/qianxian'
|
import { getJiaLouList } from '@/api/qianxian'
|
||||||
|
import { getWellnessTopImage } from '@/api/health'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -101,6 +117,17 @@ export default {
|
|||||||
cityId: '',
|
cityId: '',
|
||||||
cityName: '',
|
cityName: '',
|
||||||
categoryId: null,
|
categoryId: null,
|
||||||
|
topImageConfig: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
travelButtonSrc() {
|
||||||
|
const config = this.topImageConfig || {}
|
||||||
|
return config.travelButtonImageFocus || config.travelButtonImage || ''
|
||||||
|
},
|
||||||
|
wellnessButtonSrc() {
|
||||||
|
const config = this.topImageConfig || {}
|
||||||
|
return config.wellnessButtonImage || config.wellnessButtonImageFocus || ''
|
||||||
keyword: ''
|
keyword: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -115,6 +142,7 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
this.getTop()
|
this.getTop()
|
||||||
|
this.getTopImage()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
// uni.navigateBack({
|
// uni.navigateBack({
|
||||||
@@ -136,8 +164,7 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
// countyId: this.cityId,
|
// countyId: this.cityId,
|
||||||
goodCityId: this.cityId,
|
goodCityId: this.cityId,
|
||||||
wellnessPlaceCateId : this.categoryId,
|
shopType: 'wellnessTravel',
|
||||||
shopType: 'wellnessCate',
|
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 9999
|
limit: 9999
|
||||||
}
|
}
|
||||||
@@ -175,10 +202,44 @@ export default {
|
|||||||
uni.navigateTo({ url: '/pkg_product/views/sojoumStore?id=' + item.id })
|
uni.navigateTo({ url: '/pkg_product/views/sojoumStore?id=' + item.id })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getTopImage() {
|
||||||
|
const cached = uni.getStorageSync('wellnessTopImageConfig')
|
||||||
|
if (cached) {
|
||||||
|
this.topImageConfig = cached
|
||||||
|
}
|
||||||
|
getWellnessTopImage().then(res => {
|
||||||
|
this.topImageConfig = res.data || {}
|
||||||
|
uni.setStorageSync('wellnessTopImageConfig', this.topImageConfig)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.banner-wrap{
|
||||||
|
position: relative;
|
||||||
|
margin-left: -20rpx;
|
||||||
|
margin-right: -20rpx;
|
||||||
|
}
|
||||||
|
.banner-img{
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
.banner-tabs{
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.tab-btn{
|
||||||
|
width: 200rpx;
|
||||||
|
will-change: transform;
|
||||||
|
display: block;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
.tabs-wrap{
|
.tabs-wrap{
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|||||||
@@ -22,15 +22,15 @@
|
|||||||
class="map-icon v12-mr-1"
|
class="map-icon v12-mr-1"
|
||||||
:src="webUrl + '/orderIcon/map_white.png'"
|
:src="webUrl + '/orderIcon/map_white.png'"
|
||||||
></image>
|
></image>
|
||||||
<text class="v12-font-28">{{ item.areaName }}</text>
|
<text class="v12-font-28">{{ item.areaName || '' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-bold v12-font-28 v12-mt-1 more-t desc-txt">{{ item.intro }}</view>
|
<view class="v12-font-bold v12-font-28 v12-mt-1 more-t desc-txt">{{ item.intro || '' }}</view>
|
||||||
<view class="v12-justify-start v12-align-center v12-my-1">
|
<view class="v12-justify-start v12-align-center v12-my-1">
|
||||||
<view class="atr">
|
<view class="atr">
|
||||||
<image class="atr" :src="item.avatar"></image>
|
<image class="atr" :src="item.avatar"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.name }}</view>
|
<view class="v12-font-26 v12-ml-2 v12-dark-text one-t">{{ item.name || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image :src="webUrl + '/20230803152147141807.png'" class="icon" />
|
<image :src="webUrl + '/20230803152147141807.png'" class="icon" />
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -68,12 +68,12 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text
|
>{{ $formatCount(item.zan) }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<u-icon name="chat" size="24"></u-icon>
|
<u-icon name="chat" size="24"></u-icon>
|
||||||
<text class="seeNum-txt">{{ item.replyCount || comments.length }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.replyCount || comments.length) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -227,7 +227,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text>
|
>{{ $formatCount(item.zan) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
<button class="btn v12-primary-border v12-primary-text modify-time" @click="modifyStayTime">修改入住时间</button>
|
<button class="btn v12-primary-border v12-primary-text modify-time" @click="modifyStayTime">修改入住时间</button>
|
||||||
<button class="btn v12-primary-border v12-primary-text refund" @click="applyRefund">申请退款</button>
|
<button class="btn v12-primary-border v12-primary-text refund" @click="applyRefund">申请退款</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-align-center" v-if="orderInfo._status && ['3','4'].includes(orderInfo._status._type)">
|
<view class="v12-align-center" v-if="orderInfo._status && ['3'].includes(orderInfo._status._type)">
|
||||||
<button class="btn v12-primary-border v12-primary-text" @click="goEvaluate">立即评价</button>
|
<button class="btn v12-primary-border v12-primary-text" @click="goEvaluate">立即评价</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-align-center" v-if="!orderInfo._status && ['1','2'].includes(orderInfo._status._type)">
|
<view class="v12-align-center" v-if="!orderInfo._status && ['1','2'].includes(orderInfo._status._type)">
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ item.pv }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image
|
<image
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
v-show="item.zan > 0"
|
v-show="item.zan > 0"
|
||||||
:class="item.zanVo ? 'on' : ''"
|
:class="item.zanVo ? 'on' : ''"
|
||||||
class="seeNum-txt"
|
class="seeNum-txt"
|
||||||
>{{ item.zan }}</text>
|
>{{ $formatCount(item.zan) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
class="icon-heart"
|
class="icon-heart"
|
||||||
/>
|
/>
|
||||||
<text>{{ item['favoriteCount'] }}</text>
|
<text>{{ $formatCount(item['favoriteCount']) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user