1
This commit is contained in:
@@ -227,8 +227,12 @@ export default {
|
|||||||
else if (typeof data === 'string') this.resultList = data ? [data] : []
|
else if (typeof data === 'string') this.resultList = data ? [data] : []
|
||||||
else this.resultList = []
|
else this.resultList = []
|
||||||
|
|
||||||
// 检查是否是地址重复错误
|
// 调试:打印返回结果
|
||||||
|
console.log('返回结果:', this.resultList)
|
||||||
|
|
||||||
|
// 检查是否是地址重复或订单编号重复错误
|
||||||
if (this.checkAddressDuplicate(this.resultList)) {
|
if (this.checkAddressDuplicate(this.resultList)) {
|
||||||
|
console.log('检测到重复错误,准备显示验证码弹窗')
|
||||||
// 显示验证码弹窗
|
// 显示验证码弹窗
|
||||||
this.showVerifyDialog(cmd)
|
this.showVerifyDialog(cmd)
|
||||||
return
|
return
|
||||||
@@ -249,20 +253,25 @@ export default {
|
|||||||
},
|
},
|
||||||
// 检查是否是地址重复或订单编号重复错误
|
// 检查是否是地址重复或订单编号重复错误
|
||||||
checkAddressDuplicate(resultList) {
|
checkAddressDuplicate(resultList) {
|
||||||
if (!resultList || resultList.length === 0) return false
|
if (!resultList || resultList.length === 0) {
|
||||||
|
console.log('结果列表为空')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
console.log('检查重复错误,结果列表:', resultList)
|
||||||
for (let i = 0; i < resultList.length; i++) {
|
for (let i = 0; i < resultList.length; i++) {
|
||||||
const result = resultList[i]
|
const result = resultList[i]
|
||||||
|
console.log(`检查第${i}个结果:`, result, '类型:', typeof result)
|
||||||
if (typeof result === 'string') {
|
if (typeof result === 'string') {
|
||||||
// 检查是否包含地址重复或订单编号重复错误码
|
// 检查是否包含地址重复或订单编号重复错误码
|
||||||
if (result.includes('ERROR_CODE:ADDRESS_DUPLICATE') ||
|
const hasAddressDuplicate = result.includes('ERROR_CODE:ADDRESS_DUPLICATE')
|
||||||
result.includes('ERROR_CODE:ORDER_NUMBER_DUPLICATE') ||
|
const hasOrderNumberDuplicate = result.includes('ERROR_CODE:ORDER_NUMBER_DUPLICATE')
|
||||||
result.startsWith('ERROR_CODE:ADDRESS_DUPLICATE') ||
|
if (hasAddressDuplicate || hasOrderNumberDuplicate) {
|
||||||
result.startsWith('ERROR_CODE:ORDER_NUMBER_DUPLICATE')) {
|
console.log('检测到重复错误:', result, '地址重复:', hasAddressDuplicate, '订单编号重复:', hasOrderNumberDuplicate)
|
||||||
console.log('检测到重复错误:', result)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('未检测到重复错误')
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
// 显示验证码弹窗
|
// 显示验证码弹窗
|
||||||
|
|||||||
Reference in New Issue
Block a user