Commit 8dc7f65b authored by 刘玉宏's avatar 刘玉宏

提交

parent 42d43848
...@@ -95,6 +95,7 @@ function fieldNotEmpty(val) { ...@@ -95,6 +95,7 @@ function fieldNotEmpty(val) {
} }
const hdSubmit = async () => { const hdSubmit = async () => {
try {
if (!content.value.addrId) { if (!content.value.addrId) {
await addAddress({ await addAddress({
...forMData.value, ...forMData.value,
...@@ -109,9 +110,16 @@ const hdSubmit = async () => { ...@@ -109,9 +110,16 @@ const hdSubmit = async () => {
commonAddr: forMData.value.commonAddr ? 1 : 0, commonAddr: forMData.value.commonAddr ? 1 : 0,
}); });
} }
uni.showToast({
title: '提交成功',
duration: 2000,
});
uni.navigateTo({ uni.navigateTo({
url: '/pages/address/addressList', url: '/pages/address/addressList',
}); });
} catch (error) {
console.log(error, 'error');
}
}; };
function handleSubmit() { function handleSubmit() {
reForm.value reForm.value
...@@ -119,10 +127,6 @@ function handleSubmit() { ...@@ -119,10 +127,6 @@ function handleSubmit() {
.then(({ valid }) => { .then(({ valid }) => {
if (valid) { if (valid) {
hdSubmit(); hdSubmit();
xma.showToast({
title: '提交成功',
duration: 2000,
});
} }
}) })
.catch((error) => { .catch((error) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment