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
b490ef64
Commit
b490ef64
authored
Aug 09, 2024
by
刘玉宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tap
parent
06f8cbd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
addressEdit.vue
src/pages/address/addressEdit.vue
+18
-11
No files found.
src/pages/address/addressEdit.vue
View file @
b490ef64
...
...
@@ -4,28 +4,28 @@
<view
class=
"content"
>
<wd-form
ref=
"form"
:model=
"model"
id=
"form"
>
<wd-cell-group
border
>
<wd-cell-group>
<wd-input
label=
"联系人"
label-width=
"80px"
prop=
"
name
"
v-model=
"model.
name
"
prop=
"
receiver
"
v-model=
"model.
receiver
"
placeholder=
"请输入联系人姓名"
:rules=
"[
{ required: false, validator: fieldNotEmpty, message: '姓名不能为空' }]"
/>
<wd-input
label=
"手机号"
label-width=
"80px"
prop=
"
phon
e"
v-model=
"model.
phon
e"
prop=
"
mobil
e"
v-model=
"model.
mobil
e"
placeholder=
"请输入联系人手机号"
:rules=
"[
{ required: false, pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号' }]"
/>
<wd-input
label=
"详细地址"
label-width=
"80px"
prop=
"
detailAddress
"
v-model=
"model.
detailAddress
"
prop=
"
addr
"
v-model=
"model.
addr
"
placeholder=
"请输入详细地址"
:rules=
"[
{ required: false, validator: fieldNotEmpty, message: '详细地址不能为空' }]"
/>
...
...
@@ -42,11 +42,11 @@
</view>
</wd-cell>
</wd-checkbox-group>
<wd-checkbox-group
v-model=
"model.
isDefaultAddress
"
size=
"large"
>
<wd-cell
title=
"设置为默认地址"
center
clickable
@
click
=
"setDefaultAddress"
>
<wd-checkbox-group
v-model=
"model.
commonAddr
"
size=
"large"
>
<wd-cell
title=
"设置为默认地址"
center
clickable
@
tap
=
"setDefaultAddress"
>
<view>
<wd-checkbox
modelValuee=
"1"
modelValuee=
"1"
ref=
"checkBoxAdress"
checked-color=
"#fa5151"
custom-style=
"margin-right:-18rpx"
...
...
@@ -57,7 +57,7 @@
</wd-cell-group>
<view
class=
"footer"
>
<wd-button
type=
"error"
block
class=
"addBtn"
@
click
=
"handleSubmit"
>
保存
</wd-button>
<wd-button
type=
"error"
block
class=
"addBtn"
@
tap
=
"handleSubmit"
>
保存
</wd-button>
</view>
</wd-form>
</view>
...
...
@@ -66,7 +66,9 @@
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
addAddress
,
updateAddress
,
deleteAddress
}
from
'@/api/address'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
newAddressFlag
=
ref
(
false
);
const
form
=
ref
();
const
checkBoxAdress
=
ref
();
...
...
@@ -106,6 +108,10 @@ function fieldNotEmpty(val) {
return
false
;
}
}
const
submit
=
async
()
=>
{
const
res
=
await
addAddress
(
model
.
value
);
console
.
log
(
res
);
}
function
handleSubmit
()
{
form
.
value
.
validate
()
...
...
@@ -134,6 +140,7 @@ function changeLocation() {
page
{
background
:
#f9f9f9
;
}
.container
{
width
:
375
*
2rpx
;
margin
:
0
auto
;
...
...
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