Commit 0b579c68 by 李伟康

fix(equity-tool): 防止 vdQuotationGoodsList 为 undefined 时出错

添加对 data.vdQuotationGoodsList 的空值检查,避免在调用 reduce 方法时报错。
同时补充了错误处理中的日志输出,并在获取门店配置后增加调试日志。
1 parent a5924f93
......@@ -266,7 +266,7 @@ export default {
if (e.value == 'salesType') e.current = owner.salesType
if (e.value == 'ownerGender') e.current = owner.ownerGender
})
orderObj.skuGoods = data.vdQuotationGoodsList.reduce((pre, item) => {
orderObj.skuGoods = data.vdQuotationGoodsList ? data.vdQuotationGoodsList.reduce((pre, item) => {
// 是普通商品
if (!item.packageName && !item.specificationsValue) {
console.log(item)
......@@ -347,6 +347,7 @@ export default {
return pre
}, [])
: []
let keyList = ['mode', 'payee', 'payType', 'referrerId', 'referrer',
'deliveryId', 'deliveryName', 'notes', 'id', 'orderId'
], customerKeyList = ['owner', 'phone', 'certificateNo', 'carVin', 'seat', ,
......@@ -368,6 +369,7 @@ export default {
}, 0)
} catch (error) {
console.log(error)
uni.hideLoading()
if (error) uni.showToast({
title: error,
......@@ -807,6 +809,7 @@ export default {
res = await uni.$api.boutiqueApi.getYqStoreConfig({
yqMerchantId: merchantId
})
console.log(123)
let m = res.supportPayTypes || []
let n = this.payTypeList
let list = n.filter(k => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!