秒杀:已经接入

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(() => {
if (isEmpty(activity)) return {};
return sheep.$platform.share.getShareInfo(

View File

@ -209,7 +209,8 @@
deliveryType: 1, // TODO
pointStatus: false, // TODO
combinationActivityId: state.orderPayload.combinationActivityId,
combinationHeadId: state.orderPayload.combinationHeadId
combinationHeadId: state.orderPayload.combinationHeadId,
seckillActivityId: state.orderPayload.seckillActivityId
});
if (code !== 0) {
return;
@ -234,7 +235,8 @@
deliveryType: 1, // TODO
pointStatus: false, // TODO
combinationActivityId: state.orderPayload.combinationActivityId,
combinationHeadId: state.orderPayload.combinationHeadId
combinationHeadId: state.orderPayload.combinationHeadId,
seckillActivityId: state.orderPayload.seckillActivityId
});
if (code !== 0) {
return;

View File

@ -1,3 +1,4 @@
<!-- 商品浏览记录 -->
<template>
<s-layout title="我的足迹" :bgStyle="{ color: '#f2f2f2' }">
<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.total = data.total;
if (state.pagination.list.length < state.pagination.total) {
state.loadStatus = 'more';
} else {
state.loadStatus = 'noMore';
}
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
}
//
@ -166,6 +163,7 @@
}
state.selectAll = state.selectedSpuIdList.length === state.pagination.list.length;
};
//
const onSelectAll = () => {
state.selectAll = !state.selectAll;
@ -180,6 +178,7 @@
});
}
};
//
async function onDelete() {
if (state.selectedSpuIdList.length <= 0) {
@ -191,6 +190,7 @@
reload();
}
}
//
async function onClean() {
const { code } = await SpuHistoryApi.cleanBrowseHistory();
@ -214,9 +214,11 @@
getList();
}
}
onReachBottom(() => {
loadMore();
});
onLoad(() => {
getList();
});

View File

@ -23,13 +23,6 @@ const SpuHistoryApi = {
method: 'GET',
data
});
},
// 获得商品浏览记录数量
getBrowseHistoryCount: () => {
return request({
url: '/app-api/product/browse-history/get-count',
method: 'GET',
});
}
};
export default SpuHistoryApi;

View File

@ -19,6 +19,9 @@ const OrderApi = {
if (!(data.combinationHeadId > 0)) {
delete data2.combinationHeadId;
}
if (!(data.seckillActivityId > 0)) {
delete data2.seckillActivityId;
}
// 解决 SpringMVC 接受 List<Item> 参数的问题
delete data2.items;
for (let i = 0; i < data.items.length; i++) {