|
@@ -126,11 +126,12 @@ const handleSubmit = async () =>{
|
|
|
...detailItem.value
|
|
|
}
|
|
|
formItems.value.options.forEach(e => {
|
|
|
- obj[e.key] = e.value
|
|
|
+ if (!e.hide) obj[e.key] = e.value
|
|
|
})
|
|
|
- if (!obj.address || !obj.address.length) return Snackbar.warning('请选择收货地址')
|
|
|
- obj.contactAddress = obj.address.join('') + obj.contactAddress
|
|
|
- delete obj.address
|
|
|
+ if (obj.type && (!obj.address || !obj.address.length)) return Snackbar.warning('请选择收货地址')
|
|
|
+ if (obj.type) obj.contactAddress = obj.address.join('') + obj.contactAddress
|
|
|
+ delete obj.address
|
|
|
+ if (!obj.contactName) obj.contactName = localStorage.getItem('baseInfo') ? JSON.parse(localStorage.getItem('baseInfo')).name : '--'
|
|
|
await redeemSubmit(obj)
|
|
|
Snackbar.success('提交成功')
|
|
|
showDetail.value = false
|