Compare commits

...

7 Commits

7 changed files with 241 additions and 180 deletions

View File

@ -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;
})

View File

@ -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;

View File

@ -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();
//

View File

@ -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;
// isGroupBuyValidfalse
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,

View File

@ -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 {}

View File

@ -9,169 +9,171 @@
</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="searchBox_add" @tap="map">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/Index_add.png" mode="widthFix" />
<view>
{{ currentCity.cityName || '选择城市' }}
</view>
<!-- 城市信息部分 -->
<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>
{{ currentCity.cityName || '选择城市' }}
</view>
</view>
<!-- 搜索框 -->
<view class="search2" v-if="isShowSearch">
<view class="searchBox2">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
mode="aspectFill"></image>
<view class="hot-word-container">
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'rpx)' }">
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
@click="handleHotWordClick(word)">
{{ word }}
</view>
<!-- 搜索框 -->
<view class="search2" v-if="isShowSearch">
<view class="searchBox2">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
mode="aspectFill"></image>
<view class="hot-word-container">
<view class="hot-word-scroll" :style="{ transform: 'translateY(' + scrollPosition + 'rpx)' }">
<view v-for="(word, index) in hotWord" :key="index" class="hot-word-item"
@click="handleHotWordClick(word)">
{{ word }}
</view>
</view>
<input class="search_input" placeholder='请输入内容' confirm-type='search' @input="searchInput"
@confirm="searchInput" :value="selectKeyWord" />
</view>
</view>
</view>
<!-- 功能导航区 -->
<view class="function-nav" v-if="showNav">
<view class="function-item" @click="goToShop">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_shop.png"
mode="widthFix" />
</view>
<text>店铺管理</text>
</view>
<view class="function-item" @click="goToOrder">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_order.png"
mode="widthFix" />
</view>
<text>供应商订单</text>
</view>
<view class="function-item" @click="goToWuye">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_wuye.png"
mode="widthFix" />
</view>
<text>物业管理</text>
</view>
</view>
<!-- 轮播图 -->
<view class="swiper">
<swiper @animationfinish="swipers" autoplay circular>
<!-- <swiper-item v-for="(item, index) in bannerList" :key="index" @click="headerServerClick(item)"> -->
<swiper-item v-for="(item, index) in bannerList" :key="index">
<image :src="item.pic_src" mode="aspectFill" />
</swiper-item>
</swiper>
<view class="cirList">
<view :class="['cir', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
:key="index">
</view>
</view>
</view>
<!-- 宫格列表 -->
<view class="tabList">
<u-grid :col="rowNum" :border="false">
<u-grid-item v-for="(item, index) in tabList" @click="headerServerClick(item)" :key="index">
<image class="grid_Pic" :src="item.icon_src" mode="aspectFill"></image>
<text>{{ item.title }}</text>
</u-grid-item>
</u-grid>
</view>
</view>
<!-- 广告横幅 -->
<view class="serverList1">
<view class="serverList1_left">
<!-- <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_ad_left.jpg" mode="aspectFit" /> -->
<image :src="serverLeft" mode="aspectFit" />
</view>
<view class="serverList1_right">
<view :class="['serverItemRight', `serverItemRight${index + 1}`]" @tap="headerServerClick(item)"
v-for="(item, index) in serverRightList" :key="index">
<image :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
<input class="search_input" placeholder='请输入内容' confirm-type='search' @input="searchInput"
@confirm="searchInput" :value="selectKeyWord" />
</view>
</view>
</view>
<view class="white_container margin_top20 padding_bottom32">
<view v-if="!currentCity.district" class="Tit">定位错误 未知区域</view>
<view v-else class="Tit">
<view class="local">{{ currentCity.district }}</view>附近
<view class="Tit_desc">一刻钟便利生活圈</view>
</view>
<view class="serverList">
<view class="serverList_left">
<swiper>
<swiper-item v-for="(item, index) in homeLeftList" :key="index" @click="headerServerClick(item)">
<image :src="item.pic_src" alt="" />
<!-- <view>{{ item.ad_position }}</view> -->
<view class="mainBox" ref="mainBox">
<view class="white_container">
<!-- 功能导航区 -->
<view class="function-nav" v-if="showNav">
<view class="function-item" @click="goToShop">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_shop.png"
mode="widthFix" />
</view>
<text>店铺管理</text>
</view>
<view class="function-item" @click="goToOrder">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_order.png"
mode="widthFix" />
</view>
<text>供应商订单</text>
</view>
<view class="function-item" @click="goToWuye">
<view class="icon-box">
<image class="iconImg" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_wuye.png"
mode="widthFix" />
</view>
<text>物业管理</text>
</view>
</view>
<!-- 轮播图 -->
<view class="swiper">
<swiper @animationfinish="swipers" autoplay circular>
<!-- <swiper-item v-for="(item, index) in bannerList" :key="index" @click="headerServerClick(item)"> -->
<swiper-item v-for="(item, index) in bannerList" :key="index">
<image :src="item.pic_src" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<view class="serverList_right">
<view class="serverList_right1">
<view :class="['serverItem', `serverItem${index + 1}`]" @click="headerServerClick2(item)"
v-for="(item, index) in homeRightList1" :key="index">
<view class="serverTit">{{ item.title }}</view>
<image v-if="item.pic_src" :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
<view class="cirList">
<view :class="['cir', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
:key="index">
</view>
</view>
<view class="serverList_right2">
<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="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
<!-- 宫格列表 -->
<view class="tabList">
<u-grid :col="rowNum" :border="false">
<u-grid-item v-for="(item, index) in tabList" @click="headerServerClick(item)" :key="index">
<image class="grid_Pic" :src="item.icon_src" mode="aspectFill"></image>
<text>{{ item.title }}</text>
</u-grid-item>
</u-grid>
</view>
</view>
<!-- 广告横幅 -->
<view class="serverList1">
<view class="serverList1_left">
<!-- <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/index_ad_left.jpg" mode="aspectFit" /> -->
<image :src="serverLeft" mode="aspectFit" />
</view>
<view class="serverList1_right">
<view :class="['serverItemRight', `serverItemRight${index + 1}`]" @tap="headerServerClick(item)"
v-for="(item, index) in serverRightList" :key="index">
<image :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
</view>
<!-- <view class="merchant" @click="headershopEnterClick">商户申请入驻</view> -->
</view>
<!-- <view class="white_container margin_top20 main padding_bottom32">
<view class="white_container margin_top20 padding_bottom32">
<view v-if="!currentCity.district" class="Tit">定位错误 未知区域</view>
<view v-else class="Tit">
<view class="local">{{ currentCity.district }}</view>附近
<view class="Tit_desc">一刻钟便利生活圈</view>
</view>
<view class="serverList">
<view class="serverList_left">
<swiper>
<swiper-item v-for="(item, index) in homeLeftList" :key="index" @click="headerServerClick(item)">
<image :src="item.pic_src" alt="" />
<!-- <view>{{ item.ad_position }}</view> -->
</swiper-item>
</swiper>
</view>
<view class="serverList_right">
<view class="serverList_right1">
<view :class="['serverItem', `serverItem${index + 1}`]" @click="headerServerClick2(item)"
v-for="(item, index) in homeRightList1" :key="index">
<view class="serverTit">{{ item.title }}</view>
<image v-if="item.pic_src" :src="item.pic_src" mode="" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
<view class="serverList_right2">
<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="aspectFill" />
<!-- <view>{{ item.ad_position }}</view> -->
</view>
</view>
</view>
</view>
<!-- <view class="merchant" @click="headershopEnterClick">商户申请入驻</view> -->
</view>
<!-- <view class="white_container margin_top20 main padding_bottom32">
<image v-for="(item, index) in bottomList" :key="index" class="list_pic" :src="item.pic_src" mode="">
</image>
</view> -->
<!-- 分类标签栏 -->
<view class="category-tabs">
<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"
:class="{ activeTab: currentCategoryId === item.id }" @click="switchCategory(item.id)">
{{ item.cate_name }}
</view>
</scroll-view>
<view class="dropdown-btn" :class="{ active: showDropdown }" @click="toggleDropdown">
<u-icon v-if="!showDropdown" name="arrow-down" class="dropdown-icon"></u-icon>
<u-icon v-else name="arrow-up" class="dropdown-icon active"></u-icon>
</view>
</view>
<!-- 分类下拉列表 -->
<view class="category-dropdown" v-if="showDropdown">
<view class="dropdown-title">商品分类</view>
<view class="category-grid">
<view class="category-grid-item" v-for="item in categoryList" :key="item.id"
:class="{ activeTab: currentCategoryId === item.id }" @click="selectCategoryFromDropdown(item.id)">
{{ item.cate_name }}
<!-- 分类标签栏已移至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"
:class="{ activeTab: currentCategoryId === item.id }" @click="switchCategory(item.id)">
{{ item.cate_name }}
</view>
</scroll-view>
<view class="dropdown-btn" :class="{ active: showDropdown }" @click="toggleDropdown">
<u-icon v-if="!showDropdown" name="arrow-down" class="dropdown-icon"></u-icon>
<u-icon v-else name="arrow-up" class="dropdown-icon active"></u-icon>
</view>
</view>
</view>
<!-- 分类下拉列表 -->
<view class="category-dropdown" v-if="showDropdown">
<view class="dropdown-title">商品分类</view>
<view class="category-grid">
<view class="category-grid-item" v-for="item in categoryList" :key="item.id"
:class="{ activeTab: currentCategoryId === item.id }" @click="selectCategoryFromDropdown(item.id)">
{{ item.cate_name }}
</view>
</view>
</view>
</u-sticky>
<!-- 商家列表展示 -->
<view class="merchantList" :class="{ merchantList2: merchatList.length < 3 }">
<view class="overlay" v-if="showDropdown"></view>
@ -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,12 +218,13 @@
</view>
</view>
</view>
<view class="more" v-if="flag">下拉加载后续10条共计{{ bottomTotal }}</view>
<nav-footer />
</view>
<view class="more" v-if="flag">下拉加载后续10条共计{{ bottomTotal }}</view>
<nav-footer />
</view>
</view>
</view>
@ -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;
}
})
}
},

View File

@ -195,7 +195,8 @@ margin-right: 20rpx;
}
.title-item {
font-size: 26rpx;
font-size: 28rpx;
font-weight: bold;
}
.customer {