秒杀:已经接入

This commit is contained in:
YunaiV
2024-01-13 20:23:41 +08:00
parent 68eb1dceb7
commit 39ccc983e0
5 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -199,7 +199,7 @@
}); });
} }
// 分享信息 // 分享信息 TODO 芋艿:待接入
const shareInfo = computed(() => { const shareInfo = computed(() => {
if (isEmpty(activity)) return {}; if (isEmpty(activity)) return {};
return sheep.$platform.share.getShareInfo( return sheep.$platform.share.getShareInfo(
+4 -2
View File
@@ -209,7 +209,8 @@
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】 deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
pointStatus: false, // TODO 芋艿:需要支持【积分选择】 pointStatus: false, // TODO 芋艿:需要支持【积分选择】
combinationActivityId: state.orderPayload.combinationActivityId, combinationActivityId: state.orderPayload.combinationActivityId,
combinationHeadId: state.orderPayload.combinationHeadId combinationHeadId: state.orderPayload.combinationHeadId,
seckillActivityId: state.orderPayload.seckillActivityId
}); });
if (code !== 0) { if (code !== 0) {
return; return;
@@ -234,7 +235,8 @@
deliveryType: 1, // TODO 芋艿:需要支持【门店自提】 deliveryType: 1, // TODO 芋艿:需要支持【门店自提】
pointStatus: false, // TODO 芋艿:需要支持【积分选择】 pointStatus: false, // TODO 芋艿:需要支持【积分选择】
combinationActivityId: state.orderPayload.combinationActivityId, combinationActivityId: state.orderPayload.combinationActivityId,
combinationHeadId: state.orderPayload.combinationHeadId combinationHeadId: state.orderPayload.combinationHeadId,
seckillActivityId: state.orderPayload.seckillActivityId
}); });
if (code !== 0) { if (code !== 0) {
return; return;
+7 -5
View File
@@ -1,3 +1,4 @@
<!-- 商品浏览记录 -->
<template> <template>
<s-layout title="我的足迹" :bgStyle="{ color: '#f2f2f2' }"> <s-layout title="我的足迹" :bgStyle="{ color: '#f2f2f2' }">
<view class="cart-box ss-flex ss-flex-col ss-row-between"> <view class="cart-box ss-flex ss-flex-col ss-row-between">
@@ -150,11 +151,7 @@
state.pagination.list = _.concat(state.pagination.list, data.list); state.pagination.list = _.concat(state.pagination.list, data.list);
state.pagination.total = data.total; state.pagination.total = data.total;
if (state.pagination.list.length < state.pagination.total) { state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
} }
// 单选选中 // 单选选中
@@ -166,6 +163,7 @@
} }
state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length; state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length;
}; };
// 全选 // 全选
const onSelectAll = () => { const onSelectAll = () => {
state.selectAll = !state.selectAll; state.selectAll = !state.selectAll;
@@ -180,6 +178,7 @@
}); });
} }
}; };
// 删除足迹 // 删除足迹
async function onDelete() { async function onDelete() {
if (state.selectedSpuIdList.length <= 0) { if (state.selectedSpuIdList.length <= 0) {
@@ -191,6 +190,7 @@
reload(); reload();
} }
} }
// 清空 // 清空
async function onClean() { async function onClean() {
const { code } = await SpuHistoryApi.cleanBrowseHistory(); const { code } = await SpuHistoryApi.cleanBrowseHistory();
@@ -214,9 +214,11 @@
getList(); getList();
} }
} }
onReachBottom(() => { onReachBottom(() => {
loadMore(); loadMore();
}); });
onLoad(() => { onLoad(() => {
getList(); getList();
}); });
-7
View File
@@ -23,13 +23,6 @@ const SpuHistoryApi = {
method: 'GET', method: 'GET',
data data
}); });
},
// 获得商品浏览记录数量
getBrowseHistoryCount: () => {
return request({
url: '/app-api/product/browse-history/get-count',
method: 'GET',
});
} }
}; };
export default SpuHistoryApi; export default SpuHistoryApi;
+3
View File
@@ -19,6 +19,9 @@ const OrderApi = {
if (!(data.combinationHeadId > 0)) { if (!(data.combinationHeadId > 0)) {
delete data2.combinationHeadId; delete data2.combinationHeadId;
} }
if (!(data.seckillActivityId > 0)) {
delete data2.seckillActivityId;
}
// 解决 SpringMVC 接受 List<Item> 参数的问题 // 解决 SpringMVC 接受 List<Item> 参数的问题
delete data2.items; delete data2.items;
for (let i = 0; i < data.items.length; i++) { for (let i = 0; i < data.items.length; i++) {