Merge branch 'new-CounterFire' of http://git.kingsome.cn/huangjinming/CounterFireGames into new-CounterFire

This commit is contained in:
yuyongdong 2024-07-02 17:35:55 +08:00
commit 6716c36eb0
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -117,7 +117,6 @@ const addCart = async (val) => {
}
try {
let res = await marketplaceList.getCartListState()
if (res.data && res.data.length) {
let exists = res.data.find(item => {
@ -133,13 +132,15 @@ const addCart = async (val) => {
const currentCurrency = val.event?.data?.buy[0].contract_address || ''
const currentType = val.event?.data?.buy[0].item_type || ''
if (currency != currentCurrency || type != currentType) {
if (currency == currentCurrency && type == currentType) {
const { errcode, errmsg } = await marketplaceList.addCartListState(data)
console.log(errcode, errmsg)
if(errcode == 0) {
message.success('success! Add from cart')
marketplaceList.getCartList = await marketplaceList.getCartListState()
}
} else {
message.error('The currency is different, please empty the shopping cart first')
}
} else {
const { errcode, errmsg } = await marketplaceList.addCartListState(data)