Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
9673610c
Commit
9673610c
authored
Feb 05, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工龄选择页 页面搭建+交互 100%
parent
04e8acf2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
19 deletions
+149
-19
pages.json
take-order/pages.json
+9
-5
age.vue
take-order/pages/settle/age.vue
+99
-11
base.vue
take-order/pages/settle/base.vue
+41
-3
No files found.
take-order/pages.json
View file @
9673610c
...
...
@@ -16,12 +16,16 @@
},
{
"path"
:
"pages/settle/age"
,
"style"
:
{
"navigationBarTitleText"
:
"选择电工工龄"
}
"path"
:
"pages/settle/age"
,
"style"
:
{
"navigationBarTitleText"
:
"选择电工工龄"
}
},
},
{
"path"
:
"pages/settle/city"
,
...
...
take-order/pages/settle/age.vue
View file @
9673610c
<
template
>
<view
class=
"back_view"
>
选择电工工龄
<view
class=
"item_view margin_top_30"
>
<text
class=
"item_title"
>
选择工龄
</text>
</view>
<view
class=
"item_view"
v-for=
"(item,ikey) in ageList"
:key=
"ikey"
@
click=
"itemClick(item,ikey)"
>
<text
:class=
"selected_index == ikey ? 'item_title select_color' : 'item_title default_color' "
>
{{
item
.
title
}}
</text>
</view>
<view
class=
"bottom_view"
>
<view
class=
"bottom_btn"
@
click=
"confirmClick()"
>
<text
class=
"bottom_title"
>
确定
</text>
</view>
</view>
</view>
</
template
>
...
...
@@ -8,25 +21,48 @@
export
default
{
data
()
{
return
{
protocolContent
:
''
ageList
:[],
selected_index
:
999
,
selected_age
:
''
,
}
},
onLoad
(
e
)
{
if
(
e
&&
e
.
activeService
&&
e
.
activeService
.
length
>
0
){
//console.log(e.activeService)
this
.
activeService
=
e
.
activeService
}
this
.
getAgeData
()
},
methods
:
{
//拨打客服 点击
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
phoneNumber
:
phone
});
getAgeData
:
function
()
{
this
.
ageList
=
[
{
'title'
:
'1年'
},
{
'title'
:
'2年'
},
{
'title'
:
'3年'
},
{
'title'
:
'4年'
},
{
'title'
:
'5年'
},
]
},
itemClick
:
function
(
item
,
ikey
)
{
this
.
selected_age
=
item
.
title
this
.
selected_index
=
ikey
console
.
log
(
item
.
title
)
console
.
log
(
ikey
)
},
confirmClick
:
function
()
{
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
prevPage
.
$vm
.
age
=
this
.
selected_age
;
uni
.
navigateBack
({
})
}
}
...
...
@@ -43,4 +79,56 @@
display
:
flex
;
flex-direction
:
column
;
}
.item_view
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
88
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border
:
2
rpx
solid
#F3F3F3
;
}
.item_title
{
font-size
:
30
rpx
;
}
.default_color
{
color
:
#333333
;
}
.select_color
{
color
:
#2272FF
;
}
.margin_top_30
{
margin-top
:
30
rpx
;
}
.bottom_view
{
width
:
100%
;
height
:
170
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
bottom
:
0
;
}
.bottom_btn
{
background-color
:
#2272FF
;
width
:
600
rpx
;
height
:
100
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
border
:
2
rpx
solid
#999999
;
}
.bottom_title
{
font-size
:
32
rpx
;
color
:
#FFFFFF
;
}
</
style
>
take-order/pages/settle/base.vue
View file @
9673610c
...
...
@@ -38,7 +38,11 @@
</view>
<view
class=
"item_view margin_top_60"
@
click=
"ageClick()"
>
<text
class=
"left_title"
>
电工工龄
</text>
<image
class=
"arrow"
:src=
"icon_arrow"
mode=
""
></image>
<view
class=
"click_right_view"
>
<image
class=
"arrow"
:src=
"icon_arrow"
mode=
""
></image>
<text
class=
"click_right_text"
>
{{
age
}}
</text>
</view>
</view>
<view
class=
"notice_view"
>
<text
class=
"notice_text"
>
(必选项)选择你从事电工工作的工龄
</text>
...
...
@@ -55,9 +59,10 @@
export
default
{
data
()
{
return
{
icon_arrow
:
'https://qn-static.banshouhui.com/arrow_right.png'
,
name
:
''
,
phone
:
''
,
icon_arrow
:
'https://qn-static.banshouhui.com/arrow_right.png
'
,
age
:
'
'
,
}
},
onLoad
(
e
)
{
...
...
@@ -67,6 +72,11 @@
this
.
activeService
=
e
.
activeService
}
},
onShow
()
{
this
.
checkPast
()
},
methods
:
{
//姓名 监听
...
...
@@ -93,8 +103,23 @@
uni
.
navigateTo
({
url
:
'/pages/settle/age'
})
}
},
//必填选择
checkAll
:
function
()
{
},
checkPast
:
function
()
{
let
pages
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
];
console
.
log
(
'传过来的值:'
)
console
.
log
(
currPage
.
data
.
age
)
if
(
currPage
.
data
.
age
.
length
>
0
){
this
.
age
=
currPage
.
data
.
age
}
},
...
...
@@ -219,4 +244,17 @@
background-color
:
#2272FF
;
}
.click_right_view
{
height
:
50
rpx
;
display
:
flex
;
flex-direction
:
row-reverse
;
align-items
:
center
;
}
.click_right_text
{
margin-right
:
30
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
}
</
style
>
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