Merge branch 'dev' into test
This commit is contained in:
@@ -196,6 +196,29 @@ export function getJiaLouProductDetail(id) {
|
|||||||
return request.get('/travel/product/' + id, {}, {login: true})
|
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
|
* merId int 商户ID
|
||||||
|
|||||||
@@ -66,3 +66,9 @@ export function sojoumOrderCheckDate(params) {
|
|||||||
login: true
|
login: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function sojoumOrderComment(params) {
|
||||||
|
return request.post("/travel/travelGroupOrder/comment", params, {
|
||||||
|
login: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
+146
-40
@@ -3,66 +3,74 @@
|
|||||||
<view
|
<view
|
||||||
v-for="(item, evaluateWtapperIndex) in reply"
|
v-for="(item, evaluateWtapperIndex) in reply"
|
||||||
:key="evaluateWtapperIndex"
|
:key="evaluateWtapperIndex"
|
||||||
class="evaluateItem"
|
class="evaluateItem v12-pt-3"
|
||||||
>
|
>
|
||||||
<view class="pic-text acea-row row-middle">
|
<!-- 用户信息头部 -->
|
||||||
<view class="pictrue">
|
<view class="user-header v12-px-4">
|
||||||
<image :src="item.avatar" class="image" />
|
<view class="avatar-box">
|
||||||
|
<image :src="item.avatar" class="avatar" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="acea-row row-middle">
|
<view class="user-info">
|
||||||
<view class="name line1">{{ item.nickname }}</view>
|
<view class="name line1">{{ item.nickname }}</view>
|
||||||
<view class="time">{{ item.createTime }} </view>
|
<view class="time">{{ item.createTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-px-4">
|
<view class="v12-px-4">
|
||||||
<view class="v12-secondary-dark-text v12-font-24 attr-bg"> {{ item.sku }}</view>
|
<view class="v12-secondary-dark-text v12-font-24 attr-bg"> {{ item.sku }}</view>
|
||||||
<view class="start" :class="'star' + item.star"></view>
|
<view class="start" :class="'star' + item.star"></view>
|
||||||
</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 v-if="item.video" class="pictrue">
|
||||||
<view
|
<view
|
||||||
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||||
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
||||||
class="play-icon"
|
class="play-icon"
|
||||||
>
|
>
|
||||||
<u-icon name="play-right-fill" color="#fff" size="48"></u-icon>
|
<u-icon name="play-right-fill" color="#fff" size="48"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
v-if="activeVideo !== 'video' + evaluateWtapperIndex"
|
||||||
:src="item.video + '?vframe/jpg/offset/1'"
|
:src="item.video + '?vframe/jpg/offset/1'"
|
||||||
class="image pic-img"
|
class="image"
|
||||||
|
mode="aspectFill"
|
||||||
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
@click="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||||
>
|
/>
|
||||||
|
|
||||||
</image>
|
|
||||||
<video
|
<video
|
||||||
v-else
|
v-else
|
||||||
:src="item.video"
|
:src="item.video"
|
||||||
:poster="item.video + '?vframe/jpg/offset/1'"
|
:poster="item.video + '?vframe/jpg/offset/1'"
|
||||||
controls
|
controls
|
||||||
autoplay
|
autoplay
|
||||||
play-btn-position="center"
|
|
||||||
:id="'video' + evaluateWtapperIndex"
|
|
||||||
class="image"
|
class="image"
|
||||||
|
:id="'video' + evaluateWtapperIndex"
|
||||||
@play="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
@play="pauseOtherVideo('video' + evaluateWtapperIndex)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 图片 -->
|
||||||
<view
|
<view
|
||||||
v-for="(itemn, eq) in item.picturesArr"
|
v-for="(pic, idx) in item.picturesArr"
|
||||||
:key="eq"
|
:key="idx"
|
||||||
class="pictrue"
|
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>
|
</view>
|
||||||
|
|
||||||
|
<!-- 商家回复 -->
|
||||||
<view class="reply" v-if="item.merchantReplyContent">
|
<view class="reply" v-if="item.merchantReplyContent">
|
||||||
<span class="font-color-red">店小二</span>
|
<text class="font-color-red">店小二</text>
|
||||||
:{{item.merchantReplyContent}}
|
:{{item.merchantReplyContent}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { dataFormat } from "@/utils";
|
import { dataFormat } from "@/utils";
|
||||||
|
|
||||||
@@ -105,30 +113,128 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</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{
|
.attr-bg{
|
||||||
background: rgba(197,39,51,0.1);
|
background: rgba(197,39,51,0.1);
|
||||||
padding: 7rpx 5px;
|
padding: 7rpx 5px;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
border-radius: 12rpx;
|
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>
|
</style>
|
||||||
|
|||||||
+18
-3
@@ -46,13 +46,21 @@
|
|||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
<text class=" v12-font-36">{{ item.productPrice }}</text>
|
<text class=" v12-font-36">{{ item.productPrice }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click.stop="addToCart(item, 'productId')">
|
||||||
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
|
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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="v12-mt-2 v12-align-center">
|
||||||
<view class="primary-title" v-if="details.contentTitle">
|
<view class="primary-title" v-if="details.contentTitle">
|
||||||
{{ details.contentTitle }}
|
{{ details.contentTitle }}
|
||||||
@@ -70,7 +78,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { queryNewZone } from '@/api/activity'
|
import { queryNewZone } from '@/api/activity'
|
||||||
|
import ProductWindow from '@/components/ProductWindow'
|
||||||
|
import goCartMixin from '@/mixins/goCartMixins'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
export default{
|
export default{
|
||||||
|
components: {
|
||||||
|
ProductWindow
|
||||||
|
},
|
||||||
|
mixins: [goCartMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -89,10 +104,10 @@ export default{
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters(['isLogin', 'location', 'userInfo']),
|
||||||
bannerImage() {
|
bannerImage() {
|
||||||
return this.details.newProducts && this.details.newProducts[this.current] && this.details.newProducts[this.current].bannerImage
|
return this.details.newProducts && this.details.newProducts[this.current] && this.details.newProducts[this.current].bannerImage
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(index, tab) {
|
handleClick(index, tab) {
|
||||||
@@ -242,4 +257,4 @@ export default{
|
|||||||
border-radius: 20rpx !important;
|
border-radius: 20rpx !important;
|
||||||
position: relative !important;
|
position: relative !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,6 +11,28 @@
|
|||||||
@search="changeType"
|
@search="changeType"
|
||||||
/>
|
/>
|
||||||
</view>
|
</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">
|
<view class="m-tab-warp">
|
||||||
<u-tabs
|
<u-tabs
|
||||||
lineHeight="0"
|
lineHeight="0"
|
||||||
@@ -74,7 +96,7 @@
|
|||||||
<view
|
<view
|
||||||
v-else
|
v-else
|
||||||
class="font-color-white statusTag v12-primary"
|
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>
|
||||||
<view @click="goOrderDetails(order)">
|
<view @click="goOrderDetails(order)">
|
||||||
<view
|
<view
|
||||||
@@ -319,6 +341,12 @@
|
|||||||
@click="goOrderDetails(order)"
|
@click="goOrderDetails(order)"
|
||||||
>去评价</view>
|
>去评价</view>
|
||||||
</template>
|
</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">
|
<template v-if="parseInt(order._status._type) === 4">
|
||||||
<view class="bnt service" @click="goOrderDetails(order)">查看订单</view>
|
<view class="bnt service" @click="goOrderDetails(order)">查看订单</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -471,6 +499,12 @@ export default {
|
|||||||
{ name: '待评价' },
|
{ name: '待评价' },
|
||||||
{ name: '已完成' }
|
{ name: '已完成' }
|
||||||
],
|
],
|
||||||
|
orderTypeTabList: [
|
||||||
|
{ name: '购物', orderType: 'shop' },
|
||||||
|
{ name: '旅居', orderType: 'travel' }
|
||||||
|
],
|
||||||
|
orderTypeTabIndex: 0,
|
||||||
|
orderType: 'shop',
|
||||||
offlinePayStatus: 2,
|
offlinePayStatus: 2,
|
||||||
orderData: {},
|
orderData: {},
|
||||||
type: 0,
|
type: 0,
|
||||||
@@ -833,6 +867,11 @@ export default {
|
|||||||
this.$yroute.query.type = this.type
|
this.$yroute.query.type = this.type
|
||||||
this.changeType()
|
this.changeType()
|
||||||
},
|
},
|
||||||
|
orderTypeTabChange(item) {
|
||||||
|
this.orderTypeTabIndex = item.index
|
||||||
|
this.orderType = item.orderType
|
||||||
|
this.changeType()
|
||||||
|
},
|
||||||
changeType() {
|
changeType() {
|
||||||
this.orderList = []
|
this.orderList = []
|
||||||
this.page = 1
|
this.page = 1
|
||||||
@@ -856,13 +895,15 @@ export default {
|
|||||||
const {
|
const {
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
keyword
|
keyword,
|
||||||
|
orderType
|
||||||
} = this
|
} = this
|
||||||
getOrderList({
|
getOrderList({
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
type,
|
type,
|
||||||
keyword
|
keyword,
|
||||||
|
orderType
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.orderList = this.orderList.concat(res.data)
|
this.orderList = this.orderList.concat(res.data)
|
||||||
if (this.orderList.length > 0) {
|
if (this.orderList.length > 0) {
|
||||||
@@ -895,7 +936,7 @@ export default {
|
|||||||
status = order.isTravelGroup === 1 ? "待使用" : "待收货"
|
status = order.isTravelGroup === 1 ? "待使用" : "待收货"
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
status = order.isTravelGroup === 1 ? "已完成" : "待评价"
|
status = "待评价"
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
status = "已完成"
|
status = "已完成"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<view class="start" :class="'star' + replyData.replyStar"></view>
|
<view class="start" :class="'star' + replyData.replyStar"></view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="font-color-red">{{ replyData.replyChance || 0 }}%</text>
|
<text class="font-color-red">{{ isTravelGroup ? replyData.replyChance || 0 : replyData.replyChance + '%' || 0 }}</text>
|
||||||
<text>好评率</text>
|
<text> {{ ` 好评率` }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="nav acea-row row-middle">
|
<view class="nav acea-row row-middle">
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import UserEvaluation from "@/components/UserEvaluation";
|
import UserEvaluation from "@/components/UserEvaluation";
|
||||||
import { getReplyConfig, getReplyList } from "@/api/store";
|
import { getReplyConfig, getReplyList } from "@/api/store";
|
||||||
|
import { getJiaLouProductReply, getJiaLouProductReplyCount } from "@/api/qianxian";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -47,6 +48,7 @@ export default {
|
|||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
product_id: 0,
|
product_id: 0,
|
||||||
|
isTravelGroup: false,
|
||||||
replyData: {},
|
replyData: {},
|
||||||
navList: [
|
navList: [
|
||||||
{ evaluate: "全部", num: 0 },
|
{ evaluate: "全部", num: 0 },
|
||||||
@@ -65,6 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.product_id = this.$yroute.query.id;
|
this.product_id = this.$yroute.query.id;
|
||||||
|
this.isTravelGroup = String(this.$yroute.query.isTravelGroup || '') === '1';
|
||||||
this.getProductReplyCount();
|
this.getProductReplyCount();
|
||||||
this.getProductReplyList();
|
this.getProductReplyList();
|
||||||
},
|
},
|
||||||
@@ -74,27 +77,74 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getProductReplyCount: function() {
|
getProductReplyCount: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
getReplyConfig(that.product_id).then(res => {
|
if (that.isTravelGroup) {
|
||||||
that.$set(that, "replyData", res.data);
|
getJiaLouProductReplyCount({
|
||||||
that.navList[0].num = res.data.sumCount;
|
travelGroupProductId: that.product_id
|
||||||
that.navList[1].num = res.data.goodCount;
|
}).then(res => {
|
||||||
that.navList[2].num = res.data.inCount;
|
const data = res.data || {};
|
||||||
that.navList[3].num = res.data.poorCount;
|
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() {
|
getProductReplyList: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.loading) return; //阻止下次请求(false可以进行请求);
|
if (that.loading) return;
|
||||||
if (that.loadend) return; //阻止结束当前请求(false可以进行请求);
|
if (that.loadend) return;
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
let q = { page: that.page, limit: that.limit, type: that.currentActive };
|
let q = { page: that.page, limit: that.limit, type: that.currentActive };
|
||||||
getReplyList(that.product_id, q).then(res => {
|
if (that.isTravelGroup) {
|
||||||
that.loading = false;
|
getJiaLouProductReply({
|
||||||
//apply();js将一个数组插入另一个数组;
|
travelGroupProductId: that.product_id,
|
||||||
that.reply.push.apply(that.reply, res.data);
|
type: q.type,
|
||||||
that.loadend = res.data.length < that.limit; //判断所有数据是否加载完成;
|
page: q.page,
|
||||||
that.page = that.page + 1;
|
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) {
|
changeType: function(index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="evaluate-con">
|
<view class="evaluate-con">
|
||||||
<view
|
<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"
|
class="goodsStyle acea-row row-between"
|
||||||
>
|
>
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
@@ -78,6 +93,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { postOrderComment, postOrderProduct } from '@/api/store'
|
import { postOrderComment, postOrderProduct } from '@/api/store'
|
||||||
|
import { fetchSojoumOrderDetail, sojoumOrderComment } from '@/api/sojoumOrder'
|
||||||
import { trim } from '@/utils'
|
import { trim } from '@/utils'
|
||||||
import { required } from '@/utils/validate'
|
import { required } from '@/utils/validate'
|
||||||
import { validatorDefaultCatch } from '@/utils/dialog'
|
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||||
@@ -104,6 +120,8 @@ export default {
|
|||||||
productInfo: {}
|
productInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isTravelGroup: false,
|
||||||
|
travelOrderInfo: null,
|
||||||
scoreList: [
|
scoreList: [
|
||||||
{
|
{
|
||||||
name: '商品质量',
|
name: '商品质量',
|
||||||
@@ -125,9 +143,19 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.unique = this.$yroute.query.id
|
this.unique = this.$yroute.query.id
|
||||||
this.getOrderProduct()
|
this.isTravelGroup = this.$yroute.query.isTravelGroup === '1'
|
||||||
|
if (this.isTravelGroup) {
|
||||||
|
this.getTravelOrderDetail()
|
||||||
|
} else {
|
||||||
|
this.getOrderProduct()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTravelOrderDetail() {
|
||||||
|
fetchSojoumOrderDetail({ key: this.unique }).then(res => {
|
||||||
|
this.travelOrderInfo = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
getOrderProduct() {
|
getOrderProduct() {
|
||||||
postOrderProduct(this.unique).then(res => {
|
postOrderProduct(this.unique).then(res => {
|
||||||
this.orderCon = res.data
|
this.orderCon = res.data
|
||||||
@@ -165,14 +193,26 @@ export default {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return validatorDefaultCatch(e)
|
return validatorDefaultCatch(e)
|
||||||
}
|
}
|
||||||
postOrderComment({
|
const pics = this.picArr
|
||||||
productScore: product_score,
|
const video = this.videoArr[0] || ''
|
||||||
serviceScore: service_score,
|
const request = this.isTravelGroup
|
||||||
unique: this.unique,
|
? sojoumOrderComment({
|
||||||
pics: this.picArr.join(','),
|
orderId: this.unique,
|
||||||
comment: expect,
|
comment: expect,
|
||||||
video: this.videoArr.join(',')
|
pics,
|
||||||
}).then(() => {
|
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({
|
uni.showToast({
|
||||||
title: '评价成功',
|
title: '评价成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export default {
|
|||||||
padding: 30rpx 30rpx 0 30rpx;
|
padding: 30rpx 30rpx 0 30rpx;
|
||||||
.scroll-x-wrap {
|
.scroll-x-wrap {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 140rpx;
|
min-height: 140rpx;
|
||||||
padding: 24rpx 80rpx 16rpx 24rpx;
|
padding: 24rpx 80rpx 16rpx 24rpx;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -181,8 +181,13 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
max-height: 200rpx;
|
||||||
|
opacity: 1;
|
||||||
&.hide {
|
&.hide {
|
||||||
display: none;
|
max-height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.item + .item {
|
.item + .item {
|
||||||
margin: 0 0 0 24rpx;
|
margin: 0 0 0 24rpx;
|
||||||
@@ -202,22 +207,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.list-show-all {
|
.list-show-all {
|
||||||
position: absolute;
|
display: flex;
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 2;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
height: 0;
|
padding: 0;
|
||||||
padding: 24rpx 80rpx 16rpx 24rpx;
|
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
max-height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
&.show {
|
&.show {
|
||||||
height: auto;
|
max-height: 2000rpx;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
box-shadow: 0px 1px 4px rgba(0,0,0,0.16);
|
|
||||||
}
|
}
|
||||||
.item {
|
.item {
|
||||||
margin: 0 24rpx 24rpx 0 !important;
|
margin: 0 24rpx 24rpx 0 !important;
|
||||||
|
|||||||
@@ -155,6 +155,20 @@
|
|||||||
<image :src="img" class="v12-radius-40" style="width: 100%;" mode="aspectFill" @click="previewHero(detail.detailImages, img)" />
|
<image :src="img" class="v12-radius-40" style="width: 100%;" mode="aspectFill" @click="previewHero(detail.detailImages, img)" />
|
||||||
</view>
|
</view>
|
||||||
</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>
|
<view class="bottom-space"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
@@ -173,7 +187,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>联系商家</view>
|
<view>联系商家</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="buy-btn" @click="bookNow">
|
<view class="buy-btn" @click="handleBuyClick">
|
||||||
<view>
|
<view>
|
||||||
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
|
<u-icon :name="webUrl + '/home/icon-cart.png'" size="24"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -181,10 +195,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <Calendar ref="calendar"
|
|
||||||
:minDay="detail.minBookingDays"
|
|
||||||
@dateSelected="handleDateSelected"
|
|
||||||
></Calendar> -->
|
|
||||||
<DateRangePicker
|
<DateRangePicker
|
||||||
ref="dateRangePicker"
|
ref="dateRangePicker"
|
||||||
:show="showDatePicker"
|
:show="showDatePicker"
|
||||||
@@ -194,17 +204,41 @@
|
|||||||
@input="handleDateSelected"
|
@input="handleDateSelected"
|
||||||
>
|
>
|
||||||
</DateRangePicker>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getJiaLouProductDetail, getJiaLouCalendar,getJiaLouBookingRules } from '@/api/qianxian'
|
import { getJiaLouProductDetail, getJiaLouCalendar,getJiaLouBookingRules, getJiaLouProductReply, getTravelGroupOrderAgreement } from '@/api/qianxian'
|
||||||
import {getGiftCardSendBackground} from "@/api/gift"
|
import {getGiftCardSendBackground} from "@/api/gift"
|
||||||
import DateRangePicker from '@/components/DateRangePicker/DateRangePicker.vue'
|
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 {
|
export default {
|
||||||
name: 'GroupBuyDetails',
|
name: 'GroupBuyDetails',
|
||||||
components: {
|
components: {
|
||||||
DateRangePicker
|
DateRangePicker,
|
||||||
|
UserEvaluation,
|
||||||
|
uParse
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -218,7 +252,23 @@ export default {
|
|||||||
calendar: [],
|
calendar: [],
|
||||||
currentWeek: [],
|
currentWeek: [],
|
||||||
rules: "",
|
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() {
|
onShow() {
|
||||||
@@ -231,12 +281,18 @@ export default {
|
|||||||
onLoad(query) {
|
onLoad(query) {
|
||||||
this.id = (query && query.id) || ''
|
this.id = (query && query.id) || ''
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
// this.getCalendar()
|
this.fetchReviewList(true)
|
||||||
getJiaLouBookingRules(this.id).then(res => {
|
getJiaLouBookingRules(this.id).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.rules = res.data || ''
|
this.rules = res.data || ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.getOrderAgreement()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (!this.reviewLoadEnd) {
|
||||||
|
this.fetchReviewList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
previewHero(urls, current) {
|
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() {
|
bookNow() {
|
||||||
if(!this.dateRange[0] || !this.dateRange[1]){
|
if(!this.dateRange[0] || !this.dateRange[1]){
|
||||||
uni.showToast({
|
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] })
|
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格式的日期字符串
|
* @param {string} dateStr YYYY-MM-DD格式的日期字符串
|
||||||
@@ -392,47 +484,49 @@ export default {
|
|||||||
return '不可订'
|
return '不可订'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async fetchReviewList(reset = false) {
|
||||||
/**
|
if (this.reviewLoading) return
|
||||||
* 处理日期点击事件
|
if (!reset && this.reviewLoadEnd) return
|
||||||
* @param {Object} date 日期对象
|
if (!this.id) return
|
||||||
*/
|
if (reset) {
|
||||||
handleDateClick(date) {
|
this.reviewPage = 1
|
||||||
// 如果是不可订的日期,直接返回
|
this.reviewLoadEnd = false
|
||||||
if (date.status === '不可订') {
|
this.reviewList = []
|
||||||
uni.showToast({
|
|
||||||
title: '该日期不可预订',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
this.reviewLoading = true
|
||||||
// 检查是否已选中
|
try {
|
||||||
const index = this.rangeDate.indexOf(date.date)
|
const res = await getJiaLouProductReply({
|
||||||
if (index > -1) {
|
travelGroupProductId: this.id,
|
||||||
// 如果已选中,则取消选中
|
type: this.reviewActiveType,
|
||||||
this.rangeDate.splice(index, 1)
|
page: this.reviewPage,
|
||||||
} else {
|
limit: this.reviewLimit
|
||||||
// 如果未选中,则添加到选中列表
|
})
|
||||||
this.rangeDate.push(date.date)
|
if (res && res.status === 200 && res.data) {
|
||||||
// 对日期进行排序
|
const pageData = res.data
|
||||||
this.rangeDate.sort()
|
const rawList = Array.isArray(pageData.records) ? pageData.records : []
|
||||||
|
const list = rawList.map(item => {
|
||||||
// 检查日期连续性
|
const productScore = Number(item.productScore) || 0
|
||||||
if (this.rangeDate.length > 1) {
|
const serviceScore = Number(item.serviceScore) || 0
|
||||||
const isConsecutive = this.checkConsecutiveDates(this.rangeDate)
|
let star = productScore || serviceScore || 5
|
||||||
if (!isConsecutive) {
|
const skuText = '默认'
|
||||||
uni.showToast({
|
const picturesArr = Array.isArray(item.pics) ? item.pics : []
|
||||||
title: '请选择连续的日期',
|
return {
|
||||||
icon: 'none'
|
...item,
|
||||||
})
|
star,
|
||||||
// 移除最后添加的日期
|
sku: item.travelGroupProductName || skuText,
|
||||||
this.rangeDate.pop()
|
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 日期字符串
|
* @param {string} date 日期字符串
|
||||||
@@ -562,6 +656,56 @@ export default {
|
|||||||
.gift-wrap{
|
.gift-wrap{
|
||||||
position: relative;
|
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{
|
.intro-text{
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -572,6 +716,70 @@ export default {
|
|||||||
.package-item{
|
.package-item{
|
||||||
margin-bottom: 24rpx;
|
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{
|
.date-item{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -57,14 +57,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</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
|
<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="rank.length > 0">
|
<view class="rank-wrap v12-mt-3" v-if="hasRankData">
|
||||||
<view class="rank-items-wrap">
|
<view class="rank-items-wrap">
|
||||||
<view class="bee-rank" v-for="(k, i) in rank" :key="i">
|
<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>
|
<image :src="k.backgroundImage" class="bg-img" style="width:inherit" mode="scaleToFill"></image>
|
||||||
@@ -196,6 +196,31 @@ export default {
|
|||||||
ProductWindow
|
ProductWindow
|
||||||
},
|
},
|
||||||
mixins: [goCartMixin],
|
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,
|
||||||
|
|||||||
@@ -72,14 +72,14 @@
|
|||||||
@click="changeTab(1)"
|
@click="changeTab(1)"
|
||||||
/>
|
/>
|
||||||
</view> -->
|
</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>
|
<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 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)">
|
<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>
|
<text class="v12-font-28 v12-dark-text one-t" >{{ item.name }}</text>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="body-box">
|
<view class="body-box">
|
||||||
<view class="aside-box flex-0">
|
<view class="aside-box flex-0">
|
||||||
@@ -415,7 +415,7 @@ export default {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
|
|
||||||
.first-half {
|
.first-half {
|
||||||
height: 612rpx;
|
// height: 612rpx;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<view class="status-section" v-if="!orderInfo.isGiftCardSend">
|
<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">
|
<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)" />
|
<u-count-down v-if="orderInfo._status && ['1'].includes(orderInfo._status._type)" format="HH:mm:ss" autoStart :time="$global.diffSSS(orderInfo.confirmTimeout)" />
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-24 v12-mt-3" style="color: #666;" v-if="orderInfo._status && ['1'].includes(orderInfo._status._type)">
|
<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 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)">
|
||||||
|
<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)">
|
<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>
|
<button class="btn v12-dark-border v12-dark-text modify-time" @click="showPhoneDialog('phone')">联系商家</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -228,6 +231,9 @@ export default {
|
|||||||
this.isView = otps.isView || 0;
|
this.isView = otps.isView || 0;
|
||||||
this.getSojoumOrderDetail();
|
this.getSojoumOrderDetail();
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getSojoumOrderDetail();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDateRangeChange(dates) {
|
handleDateRangeChange(dates) {
|
||||||
// if (dates && dates.length === 2) {
|
// if (dates && dates.length === 2) {
|
||||||
@@ -385,6 +391,23 @@ export default {
|
|||||||
url: '/pkg_product/views/sojoumOrderRefund?id=' + this.key
|
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) {
|
showPhoneDialog(type) {
|
||||||
if (!this.orderInfo.merPhone && type === 'phone') {
|
if (!this.orderInfo.merPhone && type === 'phone') {
|
||||||
@@ -647,4 +670,4 @@ export default {
|
|||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ export default {
|
|||||||
},
|
},
|
||||||
videoPlay() {
|
videoPlay() {
|
||||||
this.swiperAutoplay = false;
|
this.swiperAutoplay = false;
|
||||||
|
this.coverPlay()
|
||||||
},
|
},
|
||||||
videoEnd() {
|
videoEnd() {
|
||||||
this.swiperAutoplay = true;
|
this.swiperAutoplay = true;
|
||||||
@@ -1371,4 +1372,4 @@ export default {
|
|||||||
color: #333;
|
color: #333;
|
||||||
margin-top: -28rpx;
|
margin-top: -28rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -470,4 +470,4 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.buy-btn.disabled { background: #ccc; pointer-events: none; }
|
.buy-btn.disabled { background: #ccc; pointer-events: none; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
class="address-item"
|
class="address-item"
|
||||||
:class="{'active': item.id == activeIndex}"
|
: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="address-wrap" @click="handleSelect(item)">
|
||||||
<view class="v12-font-28 v12-font-bold text">
|
<view class="v12-font-28 v12-font-bold text">
|
||||||
收货地址:
|
收货地址:
|
||||||
@@ -130,6 +136,7 @@ export default {
|
|||||||
|
|
||||||
.address-item {
|
.address-item {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
@@ -169,7 +176,17 @@ export default {
|
|||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
.active{
|
.active{
|
||||||
background-color: #F5F5F5;
|
background-color: #FFF5F5;
|
||||||
border-radius: 10rpx;
|
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>
|
</view>
|
||||||
<view class="tips">红包封面在对方领取时展示</view>
|
<view class="tips">礼包封面在对方领取时展示</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="good-story"
|
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="{
|
:style="{
|
||||||
right: (card.productStoryX*2 || 0) + 'rpx',
|
right: (card.productStoryX*2 || 0) + 'rpx',
|
||||||
top: (card.productStoryY*2 || 0) + 'rpx'
|
top: (card.productStoryY*2 || 0) + 'rpx'
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="!isGroupBuy">
|
<view v-if="!isGroupBuy">
|
||||||
<u-number-box
|
<u-number-box
|
||||||
v-if="!isPayOk"
|
v-if="showInput"
|
||||||
v-model="goodsInfo.cartNum"
|
v-model="goodsInfo.cartNum"
|
||||||
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
||||||
integer
|
integer
|
||||||
@@ -243,7 +243,8 @@ export default {
|
|||||||
showPopup: false,
|
showPopup: false,
|
||||||
blindImage: '',
|
blindImage: '',
|
||||||
isGroupBuy: false,
|
isGroupBuy: false,
|
||||||
popupCover: ''
|
popupCover: '',
|
||||||
|
showInput: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -400,9 +401,9 @@ export default {
|
|||||||
},
|
},
|
||||||
numberBlur(e) {
|
numberBlur(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.isPayOk = true
|
this.showInput = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.isPayOk = false
|
this.showInput = true
|
||||||
},10)
|
},10)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,10 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showGift() {
|
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() {
|
onShow() {
|
||||||
@@ -176,4 +179,4 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user