feat: 购物车为空时底部不显示“去结算”
This commit is contained in:
+2
-1
@@ -9,8 +9,9 @@
|
|||||||
- 添加商城订单列type为5(开通ai店铺订单)详情接口api
|
- 添加商城订单列type为5(开通ai店铺订单)详情接口api
|
||||||
- 首页`会员优选`分类兜底(已开通ai店铺不展示)
|
- 首页`会员优选`分类兜底(已开通ai店铺不展示)
|
||||||
- 首页`会员优选`分类点击购买直接跳转到购买页、支付完成返回首页
|
- 首页`会员优选`分类点击购买直接跳转到购买页、支付完成返回首页
|
||||||
- 我的社员ui重构
|
- 我的社员、我的订单ui重构
|
||||||
- 粉色卡默认false所有页面统一调整
|
- 粉色卡默认false所有页面统一调整
|
||||||
- 选品广场结算返回到我的店铺页
|
- 选品广场结算返回到我的店铺页
|
||||||
- 点底部 tab 的`AI店铺`时没开通就不跳转并提示
|
- 点底部 tab 的`AI店铺`时没开通就不跳转并提示
|
||||||
- `会员优选`商品卡片点击不再跳转到商品详情页
|
- `会员优选`商品卡片点击不再跳转到商品详情页
|
||||||
|
- 购物车为空时:底部不显示“去结算”
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="card_payment flex-center ju-between bg16 h_128 p-l-34 p-r-40" :style="{ bottom: props.bottomOffset + 'px' }">
|
<view
|
||||||
|
v-if="barVisible"
|
||||||
|
class="card_payment flex-center ju-between bg16 h_128 p-l-34 p-r-40"
|
||||||
|
:style="{ bottom: props.bottomOffset + 'px' }"
|
||||||
|
>
|
||||||
<view class="flex-center ju-flex-start flex1" @click="showPopup">
|
<view class="flex-center ju-flex-start flex1" @click="showPopup">
|
||||||
<uni-badge :text="num" absolute="rightTop" :offset="[13, 6]">
|
<uni-badge :text="num" absolute="rightTop" :offset="[13, 6]">
|
||||||
<view class="w_80 h_80 m-r-24">
|
<view class="w_80 h_80 m-r-24">
|
||||||
@@ -120,14 +124,9 @@
|
|||||||
const cartList = ref([]);
|
const cartList = ref([]);
|
||||||
let price = ref(0);
|
let price = ref(0);
|
||||||
let num = ref(0);
|
let num = ref(0);
|
||||||
let addShow1 = ref(false)
|
const barVisible = computed(() => Array.isArray(cartList.value) && cartList.value.length > 0);
|
||||||
watch(() => props.addShow, () => {
|
|
||||||
addShow1.value = props.addShow
|
const getCartList = () => {
|
||||||
}, {
|
|
||||||
immediate: true,
|
|
||||||
deep: true
|
|
||||||
})
|
|
||||||
const getCartList = (val : any = true) => {
|
|
||||||
num.value = 0;
|
num.value = 0;
|
||||||
price.value = 0;
|
price.value = 0;
|
||||||
SpuApi.getShopCartList({}).then((res) => {
|
SpuApi.getShopCartList({}).then((res) => {
|
||||||
@@ -146,14 +145,9 @@
|
|||||||
});
|
});
|
||||||
price.value += e.discountedPrice;
|
price.value += e.discountedPrice;
|
||||||
});
|
});
|
||||||
addShow1.value = true
|
|
||||||
} else {
|
|
||||||
if (!val) {
|
|
||||||
addShow1.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
cartList.value = list;
|
cartList.value = list;
|
||||||
proxy.$emit('updatePrice', addShow1.value);
|
proxy.$emit('updatePrice', list.length > 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -252,7 +246,7 @@
|
|||||||
// 删除接口
|
// 删除接口
|
||||||
SpuApi.deleteShopCart({ id: v.id }).then((res) => {
|
SpuApi.deleteShopCart({ id: v.id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
getCartList(false);
|
getCartList();
|
||||||
proxy.$emit('updataList');
|
proxy.$emit('updataList');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<s-pages title="我的收益" :pink_bg="true">
|
<s-pages title="我的收益" :blue_bg="true" navPreset="float">
|
||||||
|
|
||||||
<view class="pages">
|
<view class="pages">
|
||||||
<!-- 1 -->
|
<!-- 1 -->
|
||||||
|
|||||||
+9
-15
@@ -154,12 +154,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="payShow">
|
<view v-if="index === 0">
|
||||||
<card_payment
|
<card_payment
|
||||||
ref="paymentRef"
|
ref="paymentRef"
|
||||||
@updataList="clearSearch"
|
@updataList="clearSearch"
|
||||||
@updatePrice="updatePrice"
|
@updatePrice="updatePrice"
|
||||||
:addShow="addShow"
|
:addShow="hasPaymentBar"
|
||||||
:minSalesCountShow="navName === '折扣区'"
|
:minSalesCountShow="navName === '折扣区'"
|
||||||
:bottomOffset="tabbarBottomOffset"
|
:bottomOffset="tabbarBottomOffset"
|
||||||
/>
|
/>
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
const getCartList = async () => {
|
const getCartList = async () => {
|
||||||
const res = await api.getShopCartList({});
|
const res = await api.getShopCartList({});
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
payShow.value = index.value === 0 && Boolean(res.data.length || addShow.value);
|
hasPaymentBar.value = index.value === 0 && Boolean(res.data.length);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -255,13 +255,12 @@
|
|||||||
|
|
||||||
const index = ref(0);
|
const index = ref(0);
|
||||||
const height = ref(`${baseHeight}px`);
|
const height = ref(`${baseHeight}px`);
|
||||||
const payShow = ref(false);
|
const hasPaymentBar = ref(false);
|
||||||
const addShow = ref(false);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => payShow.value,
|
() => hasPaymentBar.value,
|
||||||
() => {
|
() => {
|
||||||
const extra = payShow.value ? paymentBarReserve : 0;
|
const extra = hasPaymentBar.value ? paymentBarReserve : 0;
|
||||||
height.value = `${baseHeight - extra}px`;
|
height.value = `${baseHeight - extra}px`;
|
||||||
},
|
},
|
||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
@@ -342,11 +341,7 @@
|
|||||||
|
|
||||||
const paymentRef = ref(null);
|
const paymentRef = ref(null);
|
||||||
const addCar = (data) => {
|
const addCar = (data) => {
|
||||||
payShow.value = index.value === 0;
|
paymentRef.value?.addCar(data);
|
||||||
addShow.value = true;
|
|
||||||
setTimeout(() => {
|
|
||||||
paymentRef.value?.addCar(data);
|
|
||||||
}, 500);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const navChange = (i) => {
|
const navChange = (i) => {
|
||||||
@@ -356,13 +351,12 @@
|
|||||||
if (index.value === 0) {
|
if (index.value === 0) {
|
||||||
getCartList();
|
getCartList();
|
||||||
} else {
|
} else {
|
||||||
payShow.value = false;
|
hasPaymentBar.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const updatePrice = (val) => {
|
const updatePrice = (val) => {
|
||||||
addShow.value = val;
|
hasPaymentBar.value = Boolean(val);
|
||||||
getCartList();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function shipment() {
|
function shipment() {
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: v-bind('headerBgHeight');
|
height: v-bind('headerBgHeight');
|
||||||
background: #00f;
|
background: url('@/static/index/login_bg.png') no-repeat 100%;
|
||||||
border-radius: 0 0 30rpx 30rpx;
|
border-radius: 0 0 30rpx 30rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
|
|||||||
+79
-38
@@ -1,6 +1,6 @@
|
|||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="我的订单">
|
<s-layout title="我的订单" navPreset="blue">
|
||||||
<card_pages
|
<card_pages
|
||||||
ref="cardPages"
|
ref="cardPages"
|
||||||
:navList="tabMaps"
|
:navList="tabMaps"
|
||||||
@@ -22,7 +22,9 @@
|
|||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="type-tab-text size32"
|
class="type-tab-text size32"
|
||||||
:class="{ activeTypeItem: state.currentType === i, activeTypeUnderline: state.currentType === i }"
|
:class="{
|
||||||
|
activeTypeItem: state.currentType === i,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ v.name }}
|
{{ v.name }}
|
||||||
</view>
|
</view>
|
||||||
@@ -43,17 +45,23 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="search flex-center">
|
<view class="search">
|
||||||
<view class="flex1" style="background-color: #fff; border-radius: 32rpx"
|
<view class="searchInput flex-center">
|
||||||
><uni-easyinput
|
<view class="searchField flex-center flex1">
|
||||||
prefixIcon="search"
|
<image class="searchFieldIcon" src="/static/icon/search.svg" mode="aspectFit" />
|
||||||
v-model="state.obj.keyWord"
|
<uni-easyinput
|
||||||
placeholder="搜索商品名称/订单编号"
|
class="flex1"
|
||||||
@iconClick="iconClick"
|
v-model="state.obj.keyWord"
|
||||||
>
|
placeholder="搜索商品名称/订单编号"
|
||||||
</uni-easyinput
|
:inputBorder="false"
|
||||||
></view>
|
@iconClick="iconClick"
|
||||||
<view class="searchBtn size32 c0" @click="downCallback(state.currentTab)">搜索</view>
|
>
|
||||||
|
</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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -168,8 +176,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const pageData = dataList.value?.[mescroll.dataObj.i] || {};
|
const pageData = dataList.value?.[mescroll.dataObj.i] || {};
|
||||||
const list = Array.isArray(pageData?.list) ? pageData.list : Array.isArray(pageData) ? pageData : [];
|
const list = Array.isArray(pageData?.list)
|
||||||
const nextList = state.currentType === 1 ? list.map((o) => ({ ...o, __source: 'aishop' })) : list;
|
? pageData.list
|
||||||
|
: Array.isArray(pageData)
|
||||||
|
? pageData
|
||||||
|
: [];
|
||||||
|
const nextList =
|
||||||
|
state.currentType === 1 ? list.map((o) => ({ ...o, __source: 'aishop' })) : list;
|
||||||
nextList.forEach((order) => handleOrderButtons(order));
|
nextList.forEach((order) => handleOrderButtons(order));
|
||||||
if (mescroll.num == 1) state.list[mescroll.dataObj.i] = [];
|
if (mescroll.num == 1) state.list[mescroll.dataObj.i] = [];
|
||||||
state.list[mescroll.dataObj.i] = state.list[mescroll.dataObj.i].concat(nextList);
|
state.list[mescroll.dataObj.i] = state.list[mescroll.dataObj.i].concat(nextList);
|
||||||
@@ -228,24 +241,29 @@
|
|||||||
|
|
||||||
.navItem {
|
.navItem {
|
||||||
padding: 18rpx 0;
|
padding: 18rpx 0;
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activeItem {
|
.activeItem {
|
||||||
color: #ff3c48;
|
color: #ffffff;
|
||||||
border-bottom: 6rpx solid #ff3c48;
|
border-bottom: 6rpx solid rgba(255, 255, 255, 0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
height: 320rpx;
|
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 {
|
.order-list-nav-top {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1rpx solid #ffe1d9;
|
background-color: transparent;
|
||||||
background-color: #fff5f2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-tabs {
|
.type-tabs {
|
||||||
@@ -265,17 +283,14 @@
|
|||||||
|
|
||||||
.type-tab-text {
|
.type-tab-text {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 18rpx 0;
|
padding: 0 25rpx;
|
||||||
font-weight: 500;
|
color: rgba(255, 255, 255, 0.85);
|
||||||
color: #333;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activeTypeItem {
|
.activeTypeItem {
|
||||||
color: #ff3c48;
|
color: #ffffff;
|
||||||
}
|
background: linear-gradient(135deg, var(--countdown-grad-start), var(--countdown-grad-end));
|
||||||
|
|
||||||
.activeTypeUnderline {
|
|
||||||
border-bottom: 6rpx solid #ff3c48;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
@@ -285,19 +300,45 @@
|
|||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchBtn {
|
.searchInput {
|
||||||
margin-left: 16rpx;
|
background-color: #ffffff;
|
||||||
}
|
border-radius: 44rpx;
|
||||||
|
overflow: hidden;
|
||||||
:deep(.is-input-border) {
|
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
border-radius: 36rpx;
|
|
||||||
background-color: #f7f8fa;
|
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.is-input-border) {
|
.searchField {
|
||||||
background: rgba(255, 255, 255, 0.34);
|
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 {
|
.orderCon {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1780650159343" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1657" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M703.873 232.437c-130.172-130.232-341.269-130.232-471.502 0s-130.233 341.33 0 471.502c60.328 60.346 143.68 97.672 235.751 97.672 92.07 0 175.422-37.327 235.75-97.672 60.347-60.329 97.673-143.681 97.673-235.751s-37.327-175.422-97.672-235.75zM159.787 776.525C80.843 697.601 32.014 588.557 32.014 468.109 32.014 227.253 227.267 32 468.123 32s436.109 195.253 436.109 436.109c0 120.448-48.83 229.492-127.773 308.415-78.917 78.897-187.928 127.694-308.336 127.694-120.409 0-229.419-48.797-308.336-127.694z m814.631 197.959c-10.772 10.789-25.662 17.463-42.112 17.463s-31.34-6.674-42.111-17.462l-84.163-84.223c-10.77-10.77-17.431-25.648-17.431-42.082 0-32.868 26.645-59.512 59.512-59.512 16.433 0 31.312 6.661 42.082 17.43l84.222 84.163c10.818 10.759 17.512 25.653 17.512 42.111s-6.695 31.353-17.51 42.109z" fill="#BFBFBF" p-id="1658"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user