feat: 购物车为空时底部不显示“去结算”
This commit is contained in:
+79
-38
@@ -1,6 +1,6 @@
|
||||
<!-- 订单列表 -->
|
||||
<template>
|
||||
<s-layout title="我的订单">
|
||||
<s-layout title="我的订单" navPreset="blue">
|
||||
<card_pages
|
||||
ref="cardPages"
|
||||
:navList="tabMaps"
|
||||
@@ -22,7 +22,9 @@
|
||||
>
|
||||
<view
|
||||
class="type-tab-text size32"
|
||||
:class="{ activeTypeItem: state.currentType === i, activeTypeUnderline: state.currentType === i }"
|
||||
:class="{
|
||||
activeTypeItem: state.currentType === i,
|
||||
}"
|
||||
>
|
||||
{{ v.name }}
|
||||
</view>
|
||||
@@ -43,17 +45,23 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="search flex-center">
|
||||
<view class="flex1" style="background-color: #fff; border-radius: 32rpx"
|
||||
><uni-easyinput
|
||||
prefixIcon="search"
|
||||
v-model="state.obj.keyWord"
|
||||
placeholder="搜索商品名称/订单编号"
|
||||
@iconClick="iconClick"
|
||||
>
|
||||
</uni-easyinput
|
||||
></view>
|
||||
<view class="searchBtn size32 c0" @click="downCallback(state.currentTab)">搜索</view>
|
||||
<view class="search">
|
||||
<view class="searchInput flex-center">
|
||||
<view class="searchField flex-center flex1">
|
||||
<image class="searchFieldIcon" src="/static/icon/search.svg" mode="aspectFit" />
|
||||
<uni-easyinput
|
||||
class="flex1"
|
||||
v-model="state.obj.keyWord"
|
||||
placeholder="搜索商品名称/订单编号"
|
||||
:inputBorder="false"
|
||||
@iconClick="iconClick"
|
||||
>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view class="searchBtn flex-center" @click="downCallback(state.currentTab)">
|
||||
<image class="searchBtnIcon" src="/static/icon/search.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -168,8 +176,13 @@
|
||||
return;
|
||||
}
|
||||
const pageData = dataList.value?.[mescroll.dataObj.i] || {};
|
||||
const list = Array.isArray(pageData?.list) ? pageData.list : Array.isArray(pageData) ? pageData : [];
|
||||
const nextList = state.currentType === 1 ? list.map((o) => ({ ...o, __source: 'aishop' })) : list;
|
||||
const list = Array.isArray(pageData?.list)
|
||||
? pageData.list
|
||||
: Array.isArray(pageData)
|
||||
? pageData
|
||||
: [];
|
||||
const nextList =
|
||||
state.currentType === 1 ? list.map((o) => ({ ...o, __source: 'aishop' })) : list;
|
||||
nextList.forEach((order) => handleOrderButtons(order));
|
||||
if (mescroll.num == 1) state.list[mescroll.dataObj.i] = [];
|
||||
state.list[mescroll.dataObj.i] = state.list[mescroll.dataObj.i].concat(nextList);
|
||||
@@ -228,24 +241,29 @@
|
||||
|
||||
.navItem {
|
||||
padding: 18rpx 0;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
.activeItem {
|
||||
color: #ff3c48;
|
||||
border-bottom: 6rpx solid #ff3c48;
|
||||
color: #ffffff;
|
||||
border-bottom: 6rpx solid rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
.nav {
|
||||
height: 320rpx;
|
||||
background-color: #fff;
|
||||
background-color: #2556ec;
|
||||
background-image: url('/static/index/logIn_bg.png');
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
background-position: top center;
|
||||
border-radius: 0 0 30rpx 30rpx;
|
||||
}
|
||||
|
||||
.order-list-nav-top {
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #ffe1d9;
|
||||
background-color: #fff5f2;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.type-tabs {
|
||||
@@ -265,17 +283,14 @@
|
||||
|
||||
.type-tab-text {
|
||||
position: relative;
|
||||
padding: 18rpx 0;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
padding: 0 25rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.activeTypeItem {
|
||||
color: #ff3c48;
|
||||
}
|
||||
|
||||
.activeTypeUnderline {
|
||||
border-bottom: 6rpx solid #ff3c48;
|
||||
color: #ffffff;
|
||||
background: linear-gradient(135deg, var(--countdown-grad-start), var(--countdown-grad-end));
|
||||
}
|
||||
|
||||
.search {
|
||||
@@ -285,19 +300,45 @@
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
:deep(.is-input-border) {
|
||||
.searchInput {
|
||||
background-color: #ffffff;
|
||||
border-radius: 44rpx;
|
||||
overflow: hidden;
|
||||
height: 72rpx;
|
||||
border-radius: 36rpx;
|
||||
background-color: #f7f8fa;
|
||||
border: none;
|
||||
}
|
||||
|
||||
:deep(.is-input-border) {
|
||||
background: rgba(255, 255, 255, 0.34);
|
||||
.searchField {
|
||||
height: 72rpx;
|
||||
padding-left: 28rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.searchFieldIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
width: 96rpx;
|
||||
height: 62rpx;
|
||||
padding: 0 10rpx;
|
||||
margin: 5rpx;
|
||||
border-radius: 44rpx;
|
||||
background: linear-gradient(135deg, var(--primary-grad-start), var(--primary-grad-end));
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__content) {
|
||||
background-color: transparent;
|
||||
height: 72rpx;
|
||||
}
|
||||
|
||||
.searchBtnIcon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
filter: brightness(0) invert(1);
|
||||
}
|
||||
|
||||
.orderCon {
|
||||
|
||||
Reference in New Issue
Block a user