秒杀:已经接入

pull/37/head
YunaiV 2024-01-13 20:23:41 +08:00
parent 68eb1dceb7
commit 39ccc983e0
5 changed files with 15 additions and 15 deletions

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(

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;

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

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;

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++) {