Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eMall_miniapp
Project
Project
Details
Activity
Releases
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
高宇
eMall_miniapp
Commits
6f85e6ad
Commit
6f85e6ad
authored
Jul 26, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择停车场
parent
5b36a937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
20 deletions
+54
-20
index.vue
homePage/parkingService/choose/index.vue
+54
-20
No files found.
homePage/parkingService/choose/index.vue
View file @
6f85e6ad
...
...
@@ -2,22 +2,13 @@
<view
class=
"choose"
>
<!--
<u-search
placeholder=
"输入停车场名称"
bg-color=
"#eee"
:show-action=
"false"
input-align=
"center"
></u-search>
-->
<view>
<u-radio-group
v-model=
"value"
@
change=
"radioGroupChange"
iconPlacement=
"right"
>
<u-radio
@
change=
"radioChange"
v-for=
"(item, index) in list"
:key=
"index"
:name=
"item.name"
:disabled=
"item.disabled"
>
<view
style=
"display: flex;flex-direction: column;"
>
<view
class=
"onetitle"
@
click=
"showaddress"
>
{{
item
.
name
}}
</view>
<view
class=
"address"
v-if=
"show"
>
<view
class=
"addresscard"
>
<view
v-for=
"item in addressList"
class=
"addressmessage"
@
click=
"choosecity(item)"
>
{{
item
.
name
}}
</view>
</view>
</view>
<view
v-else
style=
"display: flex;flex-direction: column;"
>
<span
class=
"twotitle"
>
北京世纪城
</span>
<span
class=
"threetitle"
>
北京市海淀区
</span>
<u-radio-group
v-model=
"value"
@
change=
"radioGroupChange"
iconPlacement=
"right"
:wrap=
"true"
>
<u-radio
@
change=
"radioChange(res)"
v-for=
"(res, index) in list"
:key=
"index"
:name=
"res.name"
>
<view
style=
"display: flex;flex-direction: column;"
@
click=
"checkPark(res)"
>
<view
style=
"display: flex;flex-direction: column;"
>
<spam
class=
"onetitle"
>
{{
tenantNme
}}
</spam>
<span
class=
"twotitle"
>
{{
res
.
name
}}
</span>
<span
class=
"threetitle"
>
{{
res
.
address
}}
</span>
</view>
</view>
</u-radio>
...
...
@@ -30,17 +21,51 @@
export
default
{
data
(){
return
{
list
:
[{
name
:
'北京市
'
,
disabled
:
false
}
],
name
:
''
,
tenantId
:
'
'
,
tenantNme
:
''
,
list
:
[
],
show
:
false
,
addressList
:
[],
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
value
:
'北京市'
,
}
},
onLoad
(
option
)
{
console
.
log
(
'option'
,
option
)
if
(
option
.
name
)
{
this
.
value
=
option
.
name
}
// this.init()
},
onShow
()
{
this
.
getList
()
},
methods
:{
checkPark
(
item
)
{
console
.
log
(
'item'
,
item
)
uni
.
navigateTo
({
url
:
'/homePage/parkingService/index?name='
+
item
.
name
})
},
getList
(){
const
that
=
this
uni
.
getStorage
({
key
:
'business'
,
success
:
function
(
res
){
console
.
log
(
'商圈数据'
,
res
.
data
)
that
.
tenantId
=
res
.
data
.
id
that
.
tenantNme
=
res
.
data
.
name
that
.
init
()
}
})
},
init
(){
this
.
$u
.
get
(
'/parking/mobile/list?tenantId='
+
this
.
tenantId
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
this
.
list
=
res
})
},
// 选中某个单选框时,由radio时触发
radioChange
(
e
)
{
// console.log(e);
...
...
@@ -89,6 +114,11 @@
.choose
{
padding
:
34rpx
0
;
/
deep
/
.u-radio__icon-wrap
{
position
:
absolute
;
right
:
20rpx
;
}
/
deep
/
.u-radio__icon-wrap--checked
{
order
:
2
;
position
:
absolute
;
...
...
@@ -96,16 +126,20 @@
}
.onetitle
{
margin-top
:
32rpx
;
margin-left
:
30rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
}
.twotitle
{
margin-left
:
30rpx
;
font-size
:
30rpx
;
font-weight
:
600
;
}
.threetitle
{
margin-left
:
30rpx
;
font-size
:
24rpx
;
font-weight
:
400
;
}
...
...
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