Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
8dc7f65b
Commit
8dc7f65b
authored
Aug 13, 2024
by
刘玉宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
42d43848
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
addressEdit.vue
src/pages/address/addressEdit.vue
+22
-18
No files found.
src/pages/address/addressEdit.vue
View file @
8dc7f65b
...
@@ -95,23 +95,31 @@ function fieldNotEmpty(val) {
...
@@ -95,23 +95,31 @@ function fieldNotEmpty(val) {
}
}
const
hdSubmit
=
async
()
=>
{
const
hdSubmit
=
async
()
=>
{
if
(
!
content
.
value
.
addrId
)
{
try
{
await
addAddress
({
if
(
!
content
.
value
.
addrId
)
{
...
forMData
.
value
,
await
addAddress
({
commonAddr
:
forMData
.
value
.
commonAddr
?
1
:
0
,
...
forMData
.
value
,
province
:
forMData
.
value
.
province
,
commonAddr
:
forMData
.
value
.
commonAddr
?
1
:
0
,
city
:
forMData
.
value
.
city
,
province
:
forMData
.
value
.
province
,
area
:
forMData
.
value
.
area
,
city
:
forMData
.
value
.
city
,
area
:
forMData
.
value
.
area
,
});
}
else
{
await
updateAddress
({
...
forMData
.
value
,
commonAddr
:
forMData
.
value
.
commonAddr
?
1
:
0
,
});
}
uni
.
showToast
({
title
:
'提交成功'
,
duration
:
2000
,
});
});
}
else
{
uni
.
navigateTo
({
await
updateAddress
({
url
:
'/pages/address/addressList'
,
...
forMData
.
value
,
commonAddr
:
forMData
.
value
.
commonAddr
?
1
:
0
,
});
});
}
catch
(
error
)
{
console
.
log
(
error
,
'error'
);
}
}
uni
.
navigateTo
({
url
:
'/pages/address/addressList'
,
});
};
};
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
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment