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