Merge branch 'new-CounterFire' of http://git.kingsome.cn/huangjinming/CounterFireGames into new-CounterFire
This commit is contained in:
commit
6716c36eb0
BIN
marketplace.zip
BIN
marketplace.zip
Binary file not shown.
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user