Merge branch 'dev' into test

This commit is contained in:
LinCyJang
2026-01-19 21:44:44 +08:00
19 changed files with 711 additions and 151 deletions
+23
View File
@@ -196,6 +196,29 @@ export function getJiaLouProductDetail(id) {
return request.get('/travel/product/' + id, {}, {login: true})
}
/**
* 旅居团购产品评论列表
* travelGroupProductId int 旅居团购产品ID
* type int 0-全部 1-好评 2-中评 3-差评
* page int 页码
* limit int 每页数量
*/
export function getJiaLouProductReply(params) {
return request.get('/travel/product/reply', params, {login: true})
}
/**
* 获取旅居团购产品评论统计
* travelGroupProductId int 旅居团购产品ID
*/
export function getJiaLouProductReplyCount(params) {
return request.get('/travel/product/reply/count', params, {login: true})
}
export function getTravelGroupOrderAgreement() {
return request.get('/travel/travelGroupOrderAgreement', {}, {login: true})
}
/**
* 管家列表
* merId int 商户ID
+6
View File
@@ -66,3 +66,9 @@ export function sojoumOrderCheckDate(params) {
login: true
})
}
export function sojoumOrderComment(params) {
return request.post("/travel/travelGroupOrder/comment", params, {
login: true
})
}
+146 -40
View File
@@ -3,66 +3,74 @@
<view
v-for="(item, evaluateWtapperIndex) in reply"
:key="evaluateWtapperIndex"
class="evaluateItem"
class="evaluateItem v12-pt-3"
>
<view class="pic-text acea-row row-middle">
<view class="pictrue">
<image :src="item.avatar" class="image" />
<!-- 用户信息头部 -->
<view class="user-header v12-px-4">
<view class="avatar-box">
<image :src="item.avatar" class="avatar" mode="aspectFill" />
</view>
<view class="acea-row row-middle">
<view class="user-info">
<view class="name line1">{{ item.nickname }}</view>
<view class="time">{{ item.createTime }} </view>
<view class="time">{{ item.createTime }}</view>
</view>
</view>
<view class="v12-px-4">
<view class="v12-secondary-dark-text v12-font-24 attr-bg"> {{ item.sku }}</view>
<view class="start" :class="'star' + item.star"></view>
</view>
<view class="evaluate-infor v12-font-24">{{ item.comment }}</view>
<view class="imgList acea-row">
<!-- 评论内容 -->
<view class="evaluate-infor">{{ item.comment || '此用户没有填写评价'}}</view>
<!-- 图片/视频列表 -->
<view class="imgList">
<!-- 视频 -->
<view v-if="item.video" class="pictrue">
<view
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
class="play-icon"
>
<u-icon name="play-right-fill" color="#fff" size="48"></u-icon>
</view>
>
<u-icon name="play-right-fill" color="#fff" size="48"></u-icon>
</view>
<image
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
:src="item.video + '?vframe/jpg/offset/1'"
class="image pic-img"
class="image"
mode="aspectFill"
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
>
</image>
/>
<video
v-else
:src="item.video"
:poster="item.video + '?vframe/jpg/offset/1'"
controls
autoplay
play-btn-position="center"
:id="'video' + evaluateWtapperIndex"
class="image"
:id="'video' + evaluateWtapperIndex"
@play="pauseOtherVideo('video' + evaluateWtapperIndex)"
/>
</view>
<!-- 图片 -->
<view
v-for="(itemn, eq) in item.picturesArr"
:key="eq"
v-for="(pic, idx) in item.picturesArr"
:key="idx"
class="pictrue"
>
<image :src="itemn" class="image" @click="previewImage(item.picturesArr, eq)" />
<image :src="pic" class="image" mode="aspectFill" @click="previewImage(item.picturesArr, idx)" />
</view>
</view>
<!-- 商家回复 -->
<view class="reply" v-if="item.merchantReplyContent">
<span class="font-color-red">店小二</span>
<text class="font-color-red">店小二</text>
{{item.merchantReplyContent}}
</view>
</view>
</view>
</template>
<script>
import { dataFormat } from "@/utils";
@@ -105,30 +113,128 @@ export default {
}
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
.evaluateWtapper {
.evaluateItem {
margin-bottom: 30rpx;
border-bottom: 1px solid #f5f5f5;
padding-bottom: 30rpx;
&:last-child {
border-bottom: none;
}
}
}
.user-header {
display: flex;
align-items: center;
margin-bottom: 12rpx;
.avatar-box {
margin-right: 20rpx;
.avatar {
width: 70rpx;
height: 70rpx;
border-radius: 50%;
}
}
.user-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
.name {
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-bottom: 4rpx;
}
.time {
font-size: 22rpx;
color: #999;
}
}
}
.tag-row {
margin-bottom: 12rpx;
.default-tag {
display: inline-block;
background: #FFF0F1;
color: #FE5261;
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 6rpx;
}
}
.star-row {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.star-icon {
margin-right: 4rpx;
}
}
.evaluate-infor {
font-size: 28rpx;
color: #333;
line-height: 1.6;
margin-bottom: 20rpx;
text-align: justify;
}
.imgList {
display: flex;
flex-wrap: wrap;
.pictrue {
width: 220rpx;
height: 220rpx;
margin-right: 15rpx;
margin-bottom: 15rpx;
border-radius: 12rpx;
overflow: hidden;
position: relative;
background: #f5f5f5;
&:nth-child(3n) {
margin-right: 0;
}
.image {
width: 100%;
height: 100%;
}
.play-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
}
}
.reply {
background: #F5F5F5;
border-radius: 12rpx;
padding: 20rpx;
margin-top: 10rpx;
font-size: 24rpx;
color: #666;
line-height: 1.5;
}
.attr-bg{
background: rgba(197,39,51,0.1);
padding: 7rpx 5px;
width: fit-content;
border-radius: 12rpx;
}
.time{
padding: 0 !important;
}
.evaluateWtapper .evaluateItem .imgList .pictrue{
position: relative;
width: 300rpx;
height: 300rpx;
.play-icon {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
width: 80rpx;
height: 80rpx;
}
}
</style>
+18 -3
View File
@@ -46,13 +46,21 @@
<text></text>
<text class=" v12-font-36">{{ item.productPrice }}</text>
</view>
<view>
<view @click.stop="addToCart(item, 'productId')">
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
</view>
</view>
</view>
</view>
</view>
<ProductWindow
ref="attrWindow"
:attr="attr"
:cartNum="cart_num"
:showOk="true"
@changeFun="changeFun"
@ok="handleOk(() => this.getCartCount())"
/>
<!-- <view class="v12-mt-2 v12-align-center">
<view class="primary-title" v-if="details.contentTitle">
{{ details.contentTitle }}
@@ -70,7 +78,14 @@
</template>
<script>
import { queryNewZone } from '@/api/activity'
import ProductWindow from '@/components/ProductWindow'
import goCartMixin from '@/mixins/goCartMixins'
import { mapGetters } from 'vuex'
export default{
components: {
ProductWindow
},
mixins: [goCartMixin],
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
@@ -89,10 +104,10 @@ export default{
})
},
computed: {
...mapGetters(['isLogin', 'location', 'userInfo']),
bannerImage() {
return this.details.newProducts && this.details.newProducts[this.current] && this.details.newProducts[this.current].bannerImage
}
},
methods: {
handleClick(index, tab) {
@@ -242,4 +257,4 @@ export default{
border-radius: 20rpx !important;
position: relative !important;
}
</style>
</style>
+45 -4
View File
@@ -11,6 +11,28 @@
@search="changeType"
/>
</view>
<view class="order-type-tabs v12-mb-2">
<u-tabs
lineHeight="2"
lineColor="#C52733"
:activeStyle="{
color: '#C52733',
fontWeight: 'bold'
}"
:inactiveStyle="{
color: '#333',
fontSize: '28rpx',
fontWeight: 'bold'
}"
:itemStyle="{
height: '30px',
padding: '0 15px !important'
}"
:current="orderTypeTabIndex"
:list="orderTypeTabList"
@click="orderTypeTabChange"
/>
</view>
<view class="m-tab-warp">
<u-tabs
lineHeight="0"
@@ -74,7 +96,7 @@
<view
v-else
class="font-color-white statusTag v12-primary"
>{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : getStatus(order) }}</view>
>{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }}</view>
</view>
<view @click="goOrderDetails(order)">
<view
@@ -319,6 +341,12 @@
@click="goOrderDetails(order)"
>去评价</view>
</template>
<template v-if="parseInt(order._status._type) === 3 && order.isTravelGroup === 1">
<view
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
@click="goOrderDetails(order)"
>去评价</view>
</template>
<template v-if="parseInt(order._status._type) === 4">
<view class="bnt service" @click="goOrderDetails(order)">查看订单</view>
</template>
@@ -471,6 +499,12 @@ export default {
{ name: '待评价' },
{ name: '已完成' }
],
orderTypeTabList: [
{ name: '购物', orderType: 'shop' },
{ name: '旅居', orderType: 'travel' }
],
orderTypeTabIndex: 0,
orderType: 'shop',
offlinePayStatus: 2,
orderData: {},
type: 0,
@@ -833,6 +867,11 @@ export default {
this.$yroute.query.type = this.type
this.changeType()
},
orderTypeTabChange(item) {
this.orderTypeTabIndex = item.index
this.orderType = item.orderType
this.changeType()
},
changeType() {
this.orderList = []
this.page = 1
@@ -856,13 +895,15 @@ export default {
const {
page,
limit,
keyword
keyword,
orderType
} = this
getOrderList({
page,
limit,
type,
keyword
keyword,
orderType
}).then(res => {
this.orderList = this.orderList.concat(res.data)
if (this.orderList.length > 0) {
@@ -895,7 +936,7 @@ export default {
status = order.isTravelGroup === 1 ? "待使用" : "待收货"
break;
case 3:
status = order.isTravelGroup === 1 ? "已完成" : "待评价"
status = "待评价"
break;
case 4:
status = "已完成"
+68 -18
View File
@@ -7,8 +7,8 @@
<view class="start" :class="'star' + replyData.replyStar"></view>
</view>
<view>
<text class="font-color-red">{{ replyData.replyChance || 0 }}%</text>
<text>好评率</text>
<text class="font-color-red">{{ isTravelGroup ? replyData.replyChance || 0 : replyData.replyChance + '%' || 0 }}</text>
<text> {{ ` 好评率` }}</text>
</view>
</view>
<view class="nav acea-row row-middle">
@@ -35,6 +35,7 @@
<script>
import UserEvaluation from "@/components/UserEvaluation";
import { getReplyConfig, getReplyList } from "@/api/store";
import { getJiaLouProductReply, getJiaLouProductReplyCount } from "@/api/qianxian";
import Loading from "@/components/Loading";
export default {
@@ -47,6 +48,7 @@ export default {
data: function() {
return {
product_id: 0,
isTravelGroup: false,
replyData: {},
navList: [
{ evaluate: "全部", num: 0 },
@@ -65,6 +67,7 @@ export default {
},
mounted: function() {
this.product_id = this.$yroute.query.id;
this.isTravelGroup = String(this.$yroute.query.isTravelGroup || '') === '1';
this.getProductReplyCount();
this.getProductReplyList();
},
@@ -74,27 +77,74 @@ export default {
methods: {
getProductReplyCount: function() {
let that = this;
getReplyConfig(that.product_id).then(res => {
that.$set(that, "replyData", res.data);
that.navList[0].num = res.data.sumCount;
that.navList[1].num = res.data.goodCount;
that.navList[2].num = res.data.inCount;
that.navList[3].num = res.data.poorCount;
});
if (that.isTravelGroup) {
getJiaLouProductReplyCount({
travelGroupProductId: that.product_id
}).then(res => {
const data = res.data || {};
that.$set(that, "replyData", data);
that.navList[0].num = data.sumCount || 0;
that.navList[1].num = data.goodCount || 0;
that.navList[2].num = data.inCount || 0;
that.navList[3].num = data.poorCount || 0;
});
} else {
getReplyConfig(that.product_id).then(res => {
const data = res.data || {};
that.$set(that, "replyData", data);
that.navList[0].num = data.sumCount || 0;
that.navList[1].num = data.goodCount || 0;
that.navList[2].num = data.inCount || 0;
that.navList[3].num = data.poorCount || 0;
});
}
},
getProductReplyList: function() {
let that = this;
if (that.loading) return; //阻止下次请求(false可以进行请求);
if (that.loadend) return; //阻止结束当前请求(false可以进行请求);
if (that.loading) return;
if (that.loadend) return;
that.loading = true;
let q = { page: that.page, limit: that.limit, type: that.currentActive };
getReplyList(that.product_id, q).then(res => {
that.loading = false;
//apply();js将一个数组插入另一个数组;
that.reply.push.apply(that.reply, res.data);
that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;
that.page = that.page + 1;
});
if (that.isTravelGroup) {
getJiaLouProductReply({
travelGroupProductId: that.product_id,
type: q.type,
page: q.page,
limit: q.limit
}).then(res => {
that.loading = false;
const pageData = res.data || {};
const rawList = Array.isArray(pageData.records) ? pageData.records : [];
const list = rawList.map(item => {
const productScore = Number(item.productScore) || 0;
const serviceScore = Number(item.serviceScore) || 0;
let star = productScore || serviceScore || 5;
const skuText = '默认';
const picturesArr = Array.isArray(item.pics) ? item.pics : [];
return {
...item,
star,
sku: item.travelGroupProductName || skuText,
picturesArr
};
});
that.reply.push.apply(that.reply, list);
that.loadend = list.length < that.limit || !pageData.pages || that.page >= pageData.pages;
that.page = that.page + 1;
}).catch(() => {
that.loading = false;
});
} else {
getReplyList(that.product_id, q).then(res => {
that.loading = false;
const data = res.data || [];
that.reply.push.apply(that.reply, data);
that.loadend = data.length < that.limit;
that.page = that.page + 1;
}).catch(() => {
that.loading = false;
});
}
},
changeType: function(index) {
let that = this;
+50 -10
View File
@@ -1,7 +1,22 @@
<template>
<view class="evaluate-con">
<view
v-if="orderCon.productInfo"
v-if="isTravelGroup && travelOrderInfo && travelOrderInfo.travelGroupOrderInfo && travelOrderInfo.travelGroupOrderInfo.travelGroupProduct"
class="goodsStyle acea-row row-between"
>
<view class="pictrue">
<image :src="travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.mainImage" class="image"/>
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.name }}</view>
<view class="money">
<view>{{ travelOrderInfo.travelGroupOrderInfo.travelGroupProduct.price }}</view>
<view class="num">x1</view>
</view>
</view>
</view>
<view
v-else-if="orderCon.productInfo"
class="goodsStyle acea-row row-between"
>
<view class="pictrue">
@@ -78,6 +93,7 @@
</template>
<script>
import { postOrderComment, postOrderProduct } from '@/api/store'
import { fetchSojoumOrderDetail, sojoumOrderComment } from '@/api/sojoumOrder'
import { trim } from '@/utils'
import { required } from '@/utils/validate'
import { validatorDefaultCatch } from '@/utils/dialog'
@@ -104,6 +120,8 @@ export default {
productInfo: {}
}
},
isTravelGroup: false,
travelOrderInfo: null,
scoreList: [
{
name: '商品质量',
@@ -125,9 +143,19 @@ export default {
},
mounted() {
this.unique = this.$yroute.query.id
this.getOrderProduct()
this.isTravelGroup = this.$yroute.query.isTravelGroup === '1'
if (this.isTravelGroup) {
this.getTravelOrderDetail()
} else {
this.getOrderProduct()
}
},
methods: {
getTravelOrderDetail() {
fetchSojoumOrderDetail({ key: this.unique }).then(res => {
this.travelOrderInfo = res.data
})
},
getOrderProduct() {
postOrderProduct(this.unique).then(res => {
this.orderCon = res.data
@@ -165,14 +193,26 @@ export default {
} catch (e) {
return validatorDefaultCatch(e)
}
postOrderComment({
productScore: product_score,
serviceScore: service_score,
unique: this.unique,
pics: this.picArr.join(','),
comment: expect,
video: this.videoArr.join(',')
}).then(() => {
const pics = this.picArr
const video = this.videoArr[0] || ''
const request = this.isTravelGroup
? sojoumOrderComment({
orderId: this.unique,
comment: expect,
pics,
video,
productScore: product_score,
serviceScore: service_score
})
: postOrderComment({
productScore: product_score,
serviceScore: service_score,
unique: this.unique,
pics: this.picArr.join(','),
comment: expect,
video: this.videoArr.join(',')
})
request.then(() => {
uni.showToast({
title: '评价成功',
icon: 'success',
+12 -11
View File
@@ -172,7 +172,7 @@ export default {
padding: 30rpx 30rpx 0 30rpx;
.scroll-x-wrap {
position: relative;
height: 140rpx;
min-height: 140rpx;
padding: 24rpx 80rpx 16rpx 24rpx;
border-radius: 24rpx;
background-color: #fff;
@@ -181,8 +181,13 @@ export default {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
max-height: 200rpx;
opacity: 1;
&.hide {
display: none;
max-height: 0;
opacity: 0;
margin: 0;
overflow: hidden;
}
.item + .item {
margin: 0 0 0 24rpx;
@@ -202,22 +207,18 @@ export default {
}
}
.list-show-all {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 2;
display: flex;
flex-wrap: wrap;
height: 0;
padding: 24rpx 80rpx 16rpx 24rpx;
padding: 0;
border-radius: 24rpx;
box-sizing: border-box;
background-color: #fff;
max-height: 0;
opacity: 0;
overflow: hidden;
&.show {
height: auto;
max-height: 2000rpx;
opacity: 1;
box-shadow: 0px 1px 4px rgba(0,0,0,0.16);
}
.item {
margin: 0 24rpx 24rpx 0 !important;
+253 -45
View File
@@ -155,6 +155,20 @@
<image :src="img" class="v12-radius-40" style="width: 100%;" mode="aspectFill" @click="previewHero(detail.detailImages, img)" />
</view>
</view>
<view class="v12-mt-3">
<view class="section v12-white review-section">
<view class="review-header" @click="goEvaluateList">
<text class="v12-pl-2 v12-font-bold v12-font-36 v12-align-center title-wrap">店铺评价</text>
<text class="iconfont icon-jiantou review-arrow"></text>
</view>
<view v-if="reviewList.length">
<UserEvaluation :reply="latestReviewList" />
</view>
<view v-else class="review-empty">
暂无评价
</view>
</view>
</view>
<view class="bottom-space"></view>
</scroll-view>
@@ -173,7 +187,7 @@
</view>
<view>联系商家</view>
</view>
<view class="buy-btn" @click="bookNow">
<view class="buy-btn" @click="handleBuyClick">
<view>
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
</view>
@@ -181,10 +195,6 @@
</view>
</view>
</view>
<!-- <Calendar ref="calendar"
:minDay="detail.minBookingDays"
@dateSelected="handleDateSelected"
></Calendar> -->
<DateRangePicker
ref="dateRangePicker"
:show="showDatePicker"
@@ -194,17 +204,41 @@
@input="handleDateSelected"
>
</DateRangePicker>
<u-popup
:show="showAgreementPopup"
mode="center"
round="16"
:safe-area-inset-bottom="false"
>
<view class="agreement-popup">
<view class="agreement-header">
<text class="agreement-title">{{ agreementTitle }}</text>
<text class="iconfont icon-guanbi agreement-close" @click="closeAgreement"></text>
</view>
<scroll-view scroll-y class="agreement-body">
<u-parse :content="agreementContent"></u-parse>
</scroll-view>
<view class="agreement-actions">
<button class="agreement-btn agree" @click="confirmAgreement">我同意</button>
<button class="agreement-btn cancel" @click="closeAgreement">返回</button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { getJiaLouProductDetail, getJiaLouCalendar,getJiaLouBookingRules } from '@/api/qianxian'
import { getJiaLouProductDetail, getJiaLouCalendar,getJiaLouBookingRules, getJiaLouProductReply, getTravelGroupOrderAgreement } from '@/api/qianxian'
import {getGiftCardSendBackground} from "@/api/gift"
import DateRangePicker from '@/components/DateRangePicker/DateRangePicker.vue'
import UserEvaluation from '@/components/UserEvaluation'
import uParse from '@/uni_modules/uview-ui/components/u-parse/u-parse.vue'
export default {
name: 'GroupBuyDetails',
components: {
DateRangePicker
DateRangePicker,
UserEvaluation,
uParse
},
data() {
return {
@@ -218,7 +252,23 @@ export default {
calendar: [],
currentWeek: [],
rules: "",
rangeDate: {}
rangeDate: {},
reviewActiveType: 0,
reviewList: [],
reviewPage: 1,
reviewLimit: 5,
reviewLoading: false,
reviewLoadEnd: false,
showAgreementPopup: false,
agreementTitle: '团购协议',
agreementContent: '',
enableAgreement: false
}
},
computed: {
latestReviewList() {
if (!this.reviewList || !this.reviewList.length) return []
return [this.reviewList[0]]
}
},
onShow() {
@@ -231,12 +281,18 @@ export default {
onLoad(query) {
this.id = (query && query.id) || ''
this.getDetail()
// this.getCalendar()
this.fetchReviewList(true)
getJiaLouBookingRules(this.id).then(res => {
if (res.status === 200) {
this.rules = res.data || ''
}
})
this.getOrderAgreement()
},
onReachBottom() {
if (!this.reviewLoadEnd) {
this.fetchReviewList()
}
},
methods: {
previewHero(urls, current) {
@@ -359,6 +415,32 @@ export default {
}
})
},
async getOrderAgreement() {
try {
const res = await getTravelGroupOrderAgreement()
if (res && res.status === 200 && res.data) {
const data = res.data
this.agreementTitle = data.agreementTitle || '团购协议'
this.agreementContent = data.agreementContent || ''
this.enableAgreement = !!this.agreementContent
}
} catch (e) {
}
},
handleBuyClick() {
if (this.enableAgreement && this.agreementContent) {
this.showAgreementPopup = true
return
}
this.bookNow()
},
closeAgreement() {
this.showAgreementPopup = false
},
confirmAgreement() {
this.showAgreementPopup = false
this.bookNow()
},
bookNow() {
if(!this.dateRange[0] || !this.dateRange[1]){
uni.showToast({
@@ -369,6 +451,16 @@ export default {
}
uni.navigateTo({ url: '/pkg_product/views/submitOrder?id=' + this.id + '&orderStartDate=' + this.dateRange[0] + '&orderEndDate=' + this.dateRange[1] })
},
goEvaluateList() {
if (!this.id) return
this.$yrouter.push({
path: '/pages/shop/EvaluateList/index',
query: {
id: this.id,
isTravelGroup: 1
}
})
},
/**
* 查找指定日期的预约状态
* @param {string} dateStr YYYY-MM-DD格式的日期字符串
@@ -392,47 +484,49 @@ export default {
return '不可订'
}
},
/**
* 处理日期点击事件
* @param {Object} date 日期对象
*/
handleDateClick(date) {
// 如果是不可订的日期,直接返回
if (date.status === '不可订') {
uni.showToast({
title: '该日期不可预订',
icon: 'none'
})
return
async fetchReviewList(reset = false) {
if (this.reviewLoading) return
if (!reset && this.reviewLoadEnd) return
if (!this.id) return
if (reset) {
this.reviewPage = 1
this.reviewLoadEnd = false
this.reviewList = []
}
// 检查是否已选中
const index = this.rangeDate.indexOf(date.date)
if (index > -1) {
// 如果已选中,则取消选中
this.rangeDate.splice(index, 1)
} else {
// 如果未选中,则添加到选中列表
this.rangeDate.push(date.date)
// 对日期进行排序
this.rangeDate.sort()
// 检查日期连续性
if (this.rangeDate.length > 1) {
const isConsecutive = this.checkConsecutiveDates(this.rangeDate)
if (!isConsecutive) {
uni.showToast({
title: '请选择连续的日期',
icon: 'none'
})
// 移除最后添加的日期
this.rangeDate.pop()
this.reviewLoading = true
try {
const res = await getJiaLouProductReply({
travelGroupProductId: this.id,
type: this.reviewActiveType,
page: this.reviewPage,
limit: this.reviewLimit
})
if (res && res.status === 200 && res.data) {
const pageData = res.data
const rawList = Array.isArray(pageData.records) ? pageData.records : []
const list = rawList.map(item => {
const productScore = Number(item.productScore) || 0
const serviceScore = Number(item.serviceScore) || 0
let star = productScore || serviceScore || 5
const skuText = '默认'
const picturesArr = Array.isArray(item.pics) ? item.pics : []
return {
...item,
star,
sku: item.travelGroupProductName || skuText,
picturesArr
}
})
this.reviewList = this.reviewList.concat(list)
this.reviewLoadEnd = list.length === 0 || this.reviewPage >= (pageData.pages || 0)
if (!this.reviewLoadEnd) {
this.reviewPage += 1
}
}
} finally {
this.reviewLoading = false
}
},
/**
* 检查日期是否被选中
* @param {string} date 日期字符串
@@ -562,6 +656,56 @@ export default {
.gift-wrap{
position: relative;
}
.review-section{
padding-top: 20rpx;
padding-bottom: 24rpx;
}
.review-header{
display: flex;
align-items: center;
justify-content: space-between;
}
.review-arrow{
font-size: 28rpx;
color: #333;
}
.review-title{
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.review-tabs{
margin-top: 24rpx;
display: flex;
flex-wrap: nowrap;
}
.review-tab-item{
padding: 8rpx 24rpx;
border-radius: 40rpx;
background: #f5f5f5;
font-size: 24rpx;
color: #666;
margin-right: 16rpx;
}
.review-tab-item.active{
background: #C52733;
color: #fff;
}
.review-load-more{
margin-top: 24rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
.review-no-more{
color: #ccc;
}
.review-empty{
margin-top: 32rpx;
text-align: center;
font-size: 24rpx;
color: #999;
}
.intro-text{
font-weight: 400;
font-size: 26rpx;
@@ -572,6 +716,70 @@ export default {
.package-item{
margin-bottom: 24rpx;
}
.agreement-popup {
width: 620rpx;
background: #fff;
border-radius: 24rpx;
padding: 40rpx 32rpx 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.agreement-header {
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-bottom: 30rpx;
flex-shrink: 0;
}
.agreement-title {
font-size: 34rpx;
font-weight: 700;
color: #333;
}
.agreement-close {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
font-size: 32rpx;
color: #999;
padding: 10rpx;
}
.agreement-body {
height: 600rpx;
margin-bottom: 30rpx;
background: #f8f8f8;
border-radius: 12rpx;
padding: 20rpx;
box-sizing: border-box;
}
.agreement-actions {
display: flex;
gap: 20rpx;
flex-shrink: 0;
}
.agreement-btn {
flex: 1;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
font-size: 28rpx;
font-weight: 600;
margin: 0;
&::after { border: none; }
}
.agreement-btn.agree {
background: #E53935;
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(229, 57, 53, 0.3);
}
.agreement-btn.cancel {
background: #f5f5f5;
color: #666;
}
.date-item{
display: flex;
flex-direction: column;
+27 -2
View File
@@ -57,14 +57,14 @@
</view>
</swiper-item>
</swiper>
<view class="v12-justify-center v12-mt-3" v-if="rank.length > 0">
<view class="v12-justify-center v12-mt-3" v-if="hasRankData">
<image
class="title-img"
:src="webUrl + '/orderIcon/rankTitle.png'"
mode="widthFix"
></image>
</view>
<view class="rank-wrap v12-mt-3" v-if="rank.length > 0">
<view class="rank-wrap v12-mt-3" v-if="hasRankData">
<view class="rank-items-wrap">
<view class="bee-rank" v-for="(k, i) in rank" :key="i">
<image :src="k.backgroundImage" class="bg-img" style="width:inherit" mode="scaleToFill"></image>
@@ -196,6 +196,31 @@ export default {
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() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
+3 -3
View File
@@ -72,14 +72,14 @@
@click="changeTab(1)"
/>
</view> -->
<view class="v12-justify-start v12-align-center news-wrap v12-radius-100" id="news-wrap">
<!-- <view class="v12-justify-start v12-align-center news-wrap v12-radius-100" id="news-wrap">
<view class="v12-font-bold v12-primary v12-white-text v12-mr-2 v12-pa-2 v12-radius-100 news-title">最新展会</view>
<swiper vertical class="text-swpier " autoplay circular duration="500" interval="3000" >
<swiper-item v-for="(item, index) in sanctum" :key="index" class="v12-align-center" @click="toExpo(item.id)">
<text class="v12-font-28 v12-dark-text one-t" >{{ item.name }}</text>
</swiper-item>
</swiper>
</view>
</view> -->
</view>
<view class="body-box">
<view class="aside-box flex-0">
@@ -415,7 +415,7 @@ export default {
background: #fff;
.first-half {
height: 612rpx;
// height: 612rpx;
z-index: 20;
}
+25 -2
View File
@@ -3,7 +3,7 @@
<!-- 订单状态 -->
<view class="status-section" v-if="!orderInfo.isGiftCardSend">
<view class="v12-font-28 v12-font-bold v12-primary-text v12-align-center v12-justify-between">
<text>{{orderInfo._status._title}}</text>
<text>{{orderInfo._status._title || ''}}</text>
<u-count-down v-if="orderInfo._status && ['1'].includes(orderInfo._status._type)" format="HH:mm:ss" autoStart :time="$global.diffSSS(orderInfo.confirmTimeout)" />
</view>
<view class="v12-font-24 v12-mt-3" style="color: #666;" v-if="orderInfo._status && ['1'].includes(orderInfo._status._type)">
@@ -176,6 +176,9 @@
<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>
</view>
<view class="v12-align-center" v-if="orderInfo._status && ['3','4'].includes(orderInfo._status._type)">
<button class="btn v12-primary-border v12-primary-text" @click="goEvaluate">立即评价</button>
</view>
<view class="v12-align-center" v-if="!orderInfo._status && ['1','2'].includes(orderInfo._status._type)">
<button class="btn v12-dark-border v12-dark-text modify-time" @click="showPhoneDialog('phone')">联系商家</button>
</view>
@@ -228,6 +231,9 @@ export default {
this.isView = otps.isView || 0;
this.getSojoumOrderDetail();
},
onShow() {
this.getSojoumOrderDetail();
},
methods: {
handleDateRangeChange(dates) {
// if (dates && dates.length === 2) {
@@ -385,6 +391,23 @@ export default {
url: '/pkg_product/views/sojoumOrderRefund?id=' + this.key
})
},
goEvaluate() {
const orderId = this.orderInfo.orderId
if (!orderId) {
uni.showToast({
title: '订单信息错误',
icon: 'none'
})
return
}
this.$yrouter.push({
path: '/pages/shop/GoodsEvaluate/index',
query: {
id: orderId,
isTravelGroup: 1
}
})
},
// 显示电话弹窗
showPhoneDialog(type) {
if (!this.orderInfo.merPhone && type === 'phone') {
@@ -647,4 +670,4 @@ export default {
margin-top: 30rpx;
padding: 30rpx;
}
</style>
</style>
+2 -1
View File
@@ -438,6 +438,7 @@ export default {
},
videoPlay() {
this.swiperAutoplay = false;
this.coverPlay()
},
videoEnd() {
this.swiperAutoplay = true;
@@ -1371,4 +1372,4 @@ export default {
color: #333;
margin-top: -28rpx;
}
</style>
</style>
+1 -1
View File
@@ -470,4 +470,4 @@ export default {
align-items: center;
}
.buy-btn.disabled { background: #ccc; pointer-events: none; }
</style>
</style>
+20 -3
View File
@@ -19,6 +19,12 @@
class="address-item"
:class="{'active': item.id == activeIndex}"
>
<view
v-if="item.id == activeIndex"
class="selected-flag"
>
<u-icon name="checkbox-mark" color="#ffffff" size="12"></u-icon>
</view>
<view class="address-wrap" @click="handleSelect(item)">
<view class="v12-font-28 v12-font-bold text">
收货地址
@@ -130,6 +136,7 @@ export default {
.address-item {
padding: 20rpx;
position: relative;
}
.info {
@@ -169,7 +176,17 @@ export default {
padding: 20rpx 0;
}
.active{
background-color: #F5F5F5;
border-radius: 10rpx;
background-color: #FFF5F5;
border-radius: 16rpx;
border: 2rpx solid #C52733;
}
</style>
.selected-flag{
position: absolute;
top: 0;
right: 0;
padding: 6rpx 10rpx 6rpx 14rpx;
border-radius: 0 16rpx 0 16rpx;
background-color: #C52733;
z-index: 9;
}
</style>
@@ -48,7 +48,7 @@
确定
</view>
</view>
<view class="tips">包封面在对方领取时展示</view>
<view class="tips">包封面在对方领取时展示</view>
</view>
</u-popup>
</template>
+1 -1
View File
@@ -15,7 +15,7 @@
</view>
<view
class="good-story"
v-if="card.isBlind !== 1 && card.giftProducts[0].productStory && card.isShowProductStory"
v-if="card.isBlind !== 1 && card.giftProducts && card.giftProducts[0].productStory && card.isShowProductStory"
:style="{
right: (card.productStoryX*2 || 0) + 'rpx',
top: (card.productStoryY*2 || 0) + 'rpx'
+5 -4
View File
@@ -24,7 +24,7 @@
</view>
<view v-if="!isGroupBuy">
<u-number-box
v-if="!isPayOk"
v-if="showInput"
v-model="goodsInfo.cartNum"
:max="goodsInfo['productInfo']['attrInfo']['stock']"
integer
@@ -243,7 +243,8 @@ export default {
showPopup: false,
blindImage: '',
isGroupBuy: false,
popupCover: ''
popupCover: '',
showInput: true
}
},
watch: {
@@ -400,9 +401,9 @@ export default {
},
numberBlur(e) {
console.log(e);
this.isPayOk = true
this.showInput = false
setTimeout(() => {
this.isPayOk = false
this.showInput = true
},10)
this.$forceUpdate()
},
+5 -2
View File
@@ -45,7 +45,10 @@ export default {
},
computed: {
showGift() {
return !this.giftCard.isExpire || !!this.giftCard.isUserReceive
const card = this.giftCard || {}
const giftProducts = card.giftProducts || []
const hasCurrentUserGift = giftProducts.some(item => item.isCurrentUser === 1)
return !card.isExpire || !!card.isUserReceive || (card.isBind === 1 && hasCurrentUserGift)
}
},
onShow() {
@@ -176,4 +179,4 @@ export default {
}
</style>
</style>