Compare commits
7 Commits
fd462f66bb
...
814c59cba4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
814c59cba4 | ||
|
|
ea3566baa6 | ||
|
|
ec382aacf1 | ||
|
|
9bd2f0c1ea | ||
|
|
9b58416ed4 | ||
|
|
dddee35084 | ||
|
|
62a0e5c7d7 |
@ -243,9 +243,9 @@ export default {
|
||||
receiving_address: data.merchantAddress,
|
||||
change_goods_id: data.changeServiceId
|
||||
}
|
||||
// request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
|
||||
// this.getOrderList();
|
||||
// });
|
||||
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
|
||||
this.getOrderList();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -376,8 +376,8 @@ export default {
|
||||
evaluate_status: this.evaluateStatus,
|
||||
user_id: uni.getStorageSync("userId"),
|
||||
}).then((res) => {
|
||||
res.order_list.forEach(item => {
|
||||
item.commodity_order_item_list.forEach(good => {
|
||||
res.order_list?.forEach(item => {
|
||||
item.commodity_order_item_list?.forEach(good => {
|
||||
good.commodity_pic = picUrl + good.commodity_pic;
|
||||
})
|
||||
})
|
||||
@ -390,7 +390,7 @@ export default {
|
||||
user_id: uni.getStorageSync('userId'),
|
||||
}
|
||||
request(afterSaleApi.afterSalesList, "POST", params).then((res) => {
|
||||
res.after_sales_list.forEach(item => {
|
||||
res.after_sales_list?.forEach(item => {
|
||||
item.commodity_order_item?.forEach(good => {
|
||||
good.commodity_pic = picUrl + good.commodity_pic;
|
||||
})
|
||||
|
||||
@ -18,14 +18,14 @@
|
||||
<view class="amount-item" @tap="toggleAmountExpand">
|
||||
<text class="amount-label">实付金额</text>
|
||||
<view class="amount-value">
|
||||
<text>¥{{ orderDetail.pay_method }}</text>
|
||||
<text>¥{{ orderDetail.pay_method/100 }}</text>
|
||||
<u-icon :name="amountExpanded ? 'arrow-up' : 'arrow-down'" size="28"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="amount-item" v-show="amountExpanded">
|
||||
<text class="amount-label2">订单金额</text>
|
||||
<text>¥{{ orderDetail.pay_method }}</text>
|
||||
<text>¥{{ orderDetail.pay_method/100 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
<view class="info-item">
|
||||
<text class="info-label">车牌号码</text>
|
||||
<text>{{ orderDetail.parking_record.car_number }}</text>
|
||||
<text>{{ orderDetail.record_info.car_number }}</text>
|
||||
</view>
|
||||
|
||||
<view class="info-item">
|
||||
@ -44,8 +44,11 @@
|
||||
</view>
|
||||
|
||||
<view class="info-item">
|
||||
<text class="info-label">停车时长</text>
|
||||
<text>{{ calculateParkingDuration() }}</text>
|
||||
<!-- <text class="info-label">停车时长</text>
|
||||
<text>{{ calculateParkingDuration() }}</text> -->
|
||||
|
||||
<text class="info-label">计费时长</text>
|
||||
<text>{{ getTime(orderDetail.billing_time) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="info-item">
|
||||
@ -118,13 +121,26 @@ export default {
|
||||
},
|
||||
|
||||
// 计算停车时长
|
||||
getTime(time) {
|
||||
if (!time) {
|
||||
return '0分钟';
|
||||
}
|
||||
const hourVal = Math.floor(time/60);
|
||||
const minuteVal = time%60;
|
||||
if (hourVal === 0) {
|
||||
return `${minuteVal}分钟`;
|
||||
}
|
||||
return `${hourVal}小时${minuteVal}分钟`
|
||||
},
|
||||
|
||||
|
||||
calculateParkingDuration() {
|
||||
if (!this.orderDetail || !this.orderDetail.parking_record) {
|
||||
if (!this.orderDetail || !this.orderDetail.record_info) {
|
||||
return '0分钟';
|
||||
}
|
||||
|
||||
const inTime = new Date(this.orderDetail.parking_record.in_time);
|
||||
const outTime = new Date(this.orderDetail.parking_record.out_time);
|
||||
const inTime = new Date(this.orderDetail.record_info.in_time);
|
||||
const outTime = new Date(this.orderDetail.record_info.out_time);
|
||||
|
||||
// 计算时间差(毫秒)
|
||||
const diffMs = outTime - inTime;
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
<!-- 停车费展示部分 -->
|
||||
<view v-if="showCost1">
|
||||
<view v-if="payStatus === 2" class="cost-container">
|
||||
<view v-if="payStatus === 1" class="cost-container">
|
||||
<view>
|
||||
<image class="cost-image"
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/park/park_orderLoading.png"
|
||||
@ -381,7 +381,7 @@ export default {
|
||||
this.isTimeout = false;
|
||||
|
||||
// 如果是已支付状态(pay_status=1)
|
||||
if (this.payStatus === 1 && this.payTime) {
|
||||
if (this.payStatus === 2 && this.payTime) {
|
||||
// 计算并显示倒计时
|
||||
this.updateCountdown();
|
||||
// 设置定时器,每秒更新一次倒计时
|
||||
|
||||
@ -537,9 +537,34 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
// 团购活动时间判断
|
||||
const currentTime = new Date().getTime();
|
||||
let isGroupBuyValid = true;
|
||||
|
||||
// 检查所有商品是否在团购活动时间内
|
||||
for (let supplierId in this.supplierGroups) {
|
||||
const group = this.supplierGroups[supplierId];
|
||||
for (let item of group) {
|
||||
const activityInfo = item.commodity_goods_info.group_buy_activity_info;
|
||||
// 如果没有团购活动信息,或者不在活动时间内,则isGroupBuyValid设为false
|
||||
if (!activityInfo) {
|
||||
isGroupBuyValid = false;
|
||||
break;
|
||||
}
|
||||
|
||||
const startTime = new Date(activityInfo.start_time).getTime();
|
||||
const endTime = new Date(activityInfo.end_time).getTime();
|
||||
if (!(currentTime >= startTime && currentTime <= endTime)) {
|
||||
isGroupBuyValid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isGroupBuyValid) break;
|
||||
}
|
||||
|
||||
const params = {
|
||||
user_id: uni.getStorageSync('userId'),
|
||||
is_group_buy: true,
|
||||
is_group_buy: isGroupBuyValid,
|
||||
goods_list: Object.keys(this.supplierGroups).map(supplierId => {
|
||||
const group = this.supplierGroups[supplierId];
|
||||
const firstItem = group[0];
|
||||
@ -550,9 +575,6 @@ export default {
|
||||
// 根据供应商id获取自提点信息
|
||||
const ztAddress = this.defZTAddress.find(adItem => adItem.id == supplierId) || {};
|
||||
|
||||
// 团购活动时间判断
|
||||
const currentTime = new Date().getTime();
|
||||
|
||||
return {
|
||||
supplier_id: firstItem.supplier_id,
|
||||
supplier_name: firstItem.supplier_name || '',
|
||||
@ -562,9 +584,10 @@ export default {
|
||||
receiving_address: ztAddress.address || '',
|
||||
group_buy_activity_id: firstItem.commodity_goods_info.group_buy_activity_id,
|
||||
goods_and_count: group.map(item => {
|
||||
const startTime = new Date(item.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
|
||||
const endTime = new Date(item.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
|
||||
const isGroupBuy = currentTime >= startTime && currentTime <= endTime;
|
||||
const activityInfo = item.commodity_goods_info.group_buy_activity_info;
|
||||
const isGroupBuy = activityInfo &&
|
||||
currentTime >= new Date(activityInfo.start_time).getTime() &&
|
||||
currentTime <= new Date(activityInfo.end_time).getTime();
|
||||
return {
|
||||
goods_id: item.goods_id,
|
||||
count: item.count,
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
page{
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.not_found_404 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -37,6 +41,13 @@
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.mainBox{
|
||||
height: 80.5vh;
|
||||
margin-top: 10rpx;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.hot-word-container {
|
||||
width: 60%;
|
||||
height: 50rpx;
|
||||
@ -79,7 +90,7 @@ page {
|
||||
.grid_Pic {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
@ -87,6 +98,7 @@ page {
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.searchBox_add {
|
||||
@ -497,6 +509,7 @@ page {
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding-top: 90rpx;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
@ -504,6 +517,7 @@ page {
|
||||
padding: 0 20rpx;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.tabs-scroll {
|
||||
@ -522,7 +536,7 @@ page {
|
||||
.tab-item {
|
||||
padding: 0 20rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
background-color: #ededed;
|
||||
height: 50rpx;
|
||||
@ -623,7 +637,7 @@ page {
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 90rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -739,6 +753,7 @@ page {
|
||||
padding: 0 20rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.merchantList2 {}
|
||||
|
||||
@ -9,9 +9,8 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="container" :style="{ marginTop: top + 'px' }" v-if="loading">
|
||||
<view class="white_container">
|
||||
<!-- 城市信息部分 -->
|
||||
<view class="searchBox" :style="{ height: localHeight + 'px' }">
|
||||
<view class="white_container searchBox" :style="{ height: localHeight + 'px' }">
|
||||
<view class="searchBox_add" @tap="map">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix" />
|
||||
<view>
|
||||
@ -38,6 +37,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mainBox" ref="mainBox">
|
||||
<view class="white_container">
|
||||
<!-- 功能导航区 -->
|
||||
<view class="function-nav" v-if="showNav">
|
||||
<view class="function-item" @click="goToShop">
|
||||
@ -133,7 +134,7 @@
|
||||
<view :class="['serverItem', `serverItem${index + 4}`]" @click="headerServerClick2(item)"
|
||||
v-for="(item, index) in homeRightList2" :key="index">
|
||||
<view class="serverTit">{{ item.title }}</view>
|
||||
<image :src="item.pic_src" mode="" />
|
||||
<image :src="item.pic_src" mode="aspectFill" />
|
||||
<!-- <view>{{ item.ad_position }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
@ -146,8 +147,8 @@
|
||||
<image v-for="(item, index) in bottomList" :key="index" class="list_pic" :src="item.pic_src" mode="">
|
||||
</image>
|
||||
</view> -->
|
||||
<!-- 分类标签栏 -->
|
||||
<view class="category-tabs">
|
||||
<!-- 分类标签栏已移至mainBox下方作为子盒子,保持视觉位置不变 -->
|
||||
<u-sticky>
|
||||
<view class="tabs-container">
|
||||
<scroll-view scroll-x enable-flex class="tabs-scroll" :scroll-into-view="activeCategoryId">
|
||||
<view class="tab-item" v-for="item in categoryList1" :key="item.id" :id="'category-' + item.id"
|
||||
@ -171,6 +172,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
|
||||
<!-- 商家列表展示 -->
|
||||
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
|
||||
@ -204,7 +206,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
mode="aspectFill"></image>
|
||||
点评
|
||||
</view>
|
||||
@ -215,7 +218,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="more" v-if="flag">下拉加载后续10条,共计{{ bottomTotal }}条</view>
|
||||
<nav-footer />
|
||||
@ -223,6 +225,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
@ -1047,22 +1051,24 @@ export default {
|
||||
|
||||
this.showDropdown = false;
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 1000,
|
||||
duration: 300
|
||||
});
|
||||
// 获取mainBox元素并使其滚动到底部
|
||||
const mainBox = this.$refs.mainBox;
|
||||
if (mainBox) {
|
||||
mainBox.scrollTop = 1000;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
toggleDropdown() {
|
||||
this.showDropdown = !this.showDropdown;
|
||||
// 当展开下拉菜单时,页面滑动
|
||||
// 当展开下拉菜单时,在mainBox内滑动
|
||||
if (this.showDropdown) {
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 1000,
|
||||
duration: 300
|
||||
});
|
||||
// 获取mainBox元素并使其滚动到底部
|
||||
const mainBox = this.$refs.mainBox;
|
||||
if (mainBox) {
|
||||
mainBox.scrollTop = 1000;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -195,7 +195,8 @@ margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.title-item {
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.customer {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user