🐞 fix(ID1000727):保存收货地址出错(只是点编辑进入,什么也没动,直接点的确认

This commit is contained in:
Haiyi 2022-11-21 15:13:10 +08:00
parent 561b680263
commit 1a87fb7cbc

View File

@ -172,7 +172,7 @@ export default () => {
site: addressName.join(' '), site: addressName.join(' '),
district_id: ev[ev.length - 1]?.id, district_id: ev[ev.length - 1]?.id,
is_default: ischecked, is_default: ischecked,
address_detail: itemList[3]?.value, address_detail: itemList[4]?.value,
id: infoObj?.id ? infoObj?.id : '', id: infoObj?.id ? infoObj?.id : '',
siteArray: ev, siteArray: ev,
factory: itemList[1]?.value factory: itemList[1]?.value
@ -221,7 +221,7 @@ export default () => {
const { fetchData: addAddressFetch } = mppurchaseraddress() const { fetchData: addAddressFetch } = mppurchaseraddress()
const handAdd = async () => { const handAdd = async () => {
// if (!btnDisabled) return false // if (!btnDisabled) return false
let res = await addAddressFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id) }) let res = await addAddressFetch({ ...formData, purchaser_id: Number(router.params.purchaser_id) })
if (res.data) { if (res.data) {
Taro.showToast({ Taro.showToast({
title: '成功', title: '成功',
@ -239,7 +239,7 @@ export default () => {
const { fetchData: putFetch } = mppurchaseraddressput() const { fetchData: putFetch } = mppurchaseraddressput()
const handEdit = async () => { const handEdit = async () => {
// if (!btnDisabled) return false // if (!btnDisabled) return false
let res = await putFetch({ ...getFilterData(formData), purchaser_id: Number(router.params.purchaser_id), id: Number(infoObj?.id) }) let res = await putFetch({ ...formData, purchaser_id: Number(router.params.purchaser_id), id: Number(infoObj?.id) })
if (res.msg === 'success') { if (res.msg === 'success') {
Taro.showToast({ Taro.showToast({
title: '成功', title: '成功',