Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
83b6f712
Commit
83b6f712
authored
Sep 10, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cc673b29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
345 additions
and
25 deletions
+345
-25
pages.json
pages.json
+3
-1
index.vue
pages/guidecar/index.vue
+168
-24
pickcarcity.vue
pages/guidecar/pickcarcity.vue
+174
-0
No files found.
pages.json
View file @
83b6f712
...
@@ -311,7 +311,9 @@
...
@@ -311,7 +311,9 @@
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
}]
},{
"path"
:
"pickcarcity"
}]
},
},
{
{
"root"
:
"pages/quick_share"
,
"root"
:
"pages/quick_share"
,
...
...
pages/guidecar/index.vue
View file @
83b6f712
...
@@ -21,19 +21,20 @@
...
@@ -21,19 +21,20 @@
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"content_box"
>
<view
class=
"content_box"
>
<view
class=
"c_row"
>
<view
class=
"c_row"
>
<view
class=
"topB"
v-if=
"info.IsShowCity==1"
>
<view
class=
"topB"
v-if=
"info.IsShowCity==1"
@
click=
"gocity"
>
<span
class=
'titext'
>
取车城市
</span>
<span
class=
'titext'
>
取车城市
</span>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
>
<span
class=
'ztext'
>
成都
</span><u-icon
name=
"arrow-down"
size=
"28"
color=
"#C8C8C8"
></u-icon>
<span
class=
'ztext'
>
成都
</span><u-icon
name=
"arrow-down"
size=
"28"
color=
"#C8C8C8"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"topB"
style=
"width: 150px;align-items: flex-start;"
v-if=
"info.IsShowAddress==1"
>
<view
class=
"topB"
style=
"width: 150px;align-items: flex-start;"
v-if=
"info.IsShowAddress==1"
@
click=
"openmap"
>
<span
class=
'titext'
>
接送位置
</span>
<span
class=
'titext'
>
接送位置
</span>
<span
class=
'ztext'
style=
'width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'
>
锦江区阳光新业2号楼是卡萨还打算打算的
</span>
<span
class=
'ztext'
style=
'width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'
v-if=
"address!=''"
>
{{
address
}}
</span>
<span
class=
'ztext'
style=
'color: #E2E2E2;'
v-if=
"address==''"
>
请选择
</span>
</view>
</view>
<view
class=
"topB"
v-if=
"info.IsShowCarpooling==1"
>
<view
class=
"topB"
v-if=
"info.IsShowCarpooling==1
&& msg.CarType==5"
style=
"align-items: center;
"
>
<span
class=
'titext'
>
是否拼车
</span>
<span
class=
'titext'
>
是否拼车
</span>
<u-switch
v-model=
"
checked
"
size=
'30'
></u-switch>
<u-switch
v-model=
"
iscarpool
"
size=
'30'
></u-switch>
</view>
</view>
</view>
</view>
<view
class=
"c_row"
>
<view
class=
"c_row"
>
...
@@ -49,24 +50,24 @@
...
@@ -49,24 +50,24 @@
<span
class=
'ztext'
:style=
"
{'color':msg.CarClass==''?'#E2E2E2':'#1C1E1F'}">
{{
carName
}}
</span><u-icon
name=
"arrow-down"
size=
"28"
color=
"#C8C8C8"
></u-icon>
<span
class=
'ztext'
:style=
"
{'color':msg.CarClass==''?'#E2E2E2':'#1C1E1F'}">
{{
carName
}}
</span><u-icon
name=
"arrow-down"
size=
"28"
color=
"#C8C8C8"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"topB"
v-if=
"info.IsShowTravelGuestNum==1"
>
<view
class=
"topB"
v-if=
"info.IsShowTravelGuestNum==1"
style=
"align-items: center;"
>
<span
class=
'titext'
>
出行人数
</span>
<span
class=
'titext'
>
出行人数
</span>
<input
class=
"uni-input"
v-model=
"msg.
number
"
style=
"width: 50px;text-align: center;"
/>
<input
class=
"uni-input"
v-model=
"msg.
RideNum
"
style=
"width: 50px;text-align: center;"
/>
</view>
</view>
</view>
</view>
<view
class=
"c_row"
v-if=
"info.IsShowDate==1"
>
<view
class=
"c_row"
v-if=
"info.IsShowDate==1"
>
<view
class=
"topB"
>
<view
class=
"topB"
@
click=
"showStart=true,timeType=1,defaultTime = msg.StartTime"
>
<span
class=
'ztext'
>
09月01
日
</span>
<span
class=
'ztext'
>
{{
STime
.
month
}}
月
{{
STime
.
day
}}
日
</span>
<span
class=
'titext'
>
周二 20:30
</span>
<span
class=
'titext'
>
{{
STime
.
week
+
' '
+
STime
.
hour
+
':'
+
STime
.
minute
}}
</span>
</view>
</view>
<view
class=
"topB"
style=
"height: 20px;"
>
<view
class=
"topB"
style=
"height: 20px;
align-items: center;
"
>
<span
style=
'font-size: 11px;color: #1C1E1F;'
>
2tian
</span>
<span
style=
'font-size: 11px;color: #1C1E1F;'
>
{{
intervalDay
}}
</span>
<image
src=
"../../static/images/sanjiao.png"
mode=
"aspectFill"
style=
"width: 55px;height: 4px;"
></image>
<image
src=
"../../static/images/sanjiao.png"
mode=
"aspectFill"
style=
"width: 55px;height: 4px;"
></image>
</view>
</view>
<view
class=
"topB"
>
<view
class=
"topB"
@
click=
"showStart=true,timeType=2,defaultTime = msg.EndTime"
>
<span
class=
'ztext'
>
09月01
日
</span>
<span
class=
'ztext'
>
{{
ETime
.
month
}}
月
{{
ETime
.
day
}}
日
</span>
<span
class=
'titext'
>
周二 20:30
</span>
<span
class=
'titext'
>
{{
ETime
.
week
+
' '
+
ETime
.
hour
+
':'
+
ETime
.
minute
}}
</span>
</view>
</view>
</view>
</view>
<view
class=
"c_row_t"
>
<view
class=
"c_row_t"
>
...
@@ -91,7 +92,7 @@
...
@@ -91,7 +92,7 @@
</view>
</view>
<scroll-view
<scroll-view
:scroll-y=
"true"
:scroll-y=
"true"
style=
"height: 420px;"
>
style=
"
max-
height: 420px;"
>
<view
class=
"txtype"
>
<view
class=
"txtype"
>
<view
class=
"typeitem"
v-for=
"(item, index) in classList"
:key=
"index"
>
<view
class=
"typeitem"
v-for=
"(item, index) in classList"
:key=
"index"
>
<Text>
{{
item
.
Name
}}
</Text>
<Text>
{{
item
.
Name
}}
</Text>
...
@@ -111,6 +112,39 @@
...
@@ -111,6 +112,39 @@
</view>
</view>
</u-popup>
</u-popup>
<u-popup
v-model=
"show2"
mode=
"bottom"
border-radius=
"16"
>
<view
class=
"popupBox"
>
<view
class=
"popup_top"
>
<view></view>
<Text>
出行类型
</Text>
<u-icon
name=
"cross"
color=
'#9F9F9F'
@
click=
'show=false'
size=
"40"
></u-icon>
</view>
<scroll-view
:scroll-y=
"true"
style=
"max-height: 420px;"
>
<view
class=
"txtype"
>
<view
class=
"typeitem"
v-for=
"(item, index) in EnumList"
:key=
"index"
>
<Text>
{{
item
.
Name
}}
</Text>
<u-radio-group
v-model=
"value"
>
<u-radio
v-model =
'item.checked'
active-color=
"#EE4454"
shape=
"circle"
:name=
"item.Name"
@
change=
"radioChange2(item)"
>
</u-radio>
</u-radio-group>
</view>
</view>
</scroll-view>
</view>
</u-popup>
<u-picker
v-model=
"showStart"
mode=
"time"
:params=
"params"
@
confirm=
'btnStart'
:default-time=
'defaultTime'
></u-picker>
</div>
</div>
</
template
>
</
template
>
...
@@ -125,7 +159,7 @@
...
@@ -125,7 +159,7 @@
scrollTop
:
0
,
scrollTop
:
0
,
headStyle
:{},
headStyle
:{},
nav
:
0
,
nav
:
0
,
checked
:
tru
e
,
iscarpool
:
fals
e
,
classList
:[],
classList
:[],
EnumList
:[],
EnumList
:[],
EnumName
:
'请选择'
,
EnumName
:
'请选择'
,
...
@@ -133,6 +167,12 @@
...
@@ -133,6 +167,12 @@
show2
:
false
,
show2
:
false
,
carName
:
"请选择"
,
carName
:
"请选择"
,
value
:
''
,
value
:
''
,
defaultTime
:
''
,
showStart
:
false
,
STime
:{},
//显示的出行时间
ETime
:{},
//显示的结束时间
intervalDay
:
''
,
//间隔天数
address
:
''
,
//详情地址
msg
:{
msg
:{
StartTime
:
''
,
//取车时间
StartTime
:
''
,
//取车时间
EndTime
:
''
,
//还车时间
EndTime
:
''
,
//还车时间
...
@@ -142,7 +182,15 @@
...
@@ -142,7 +182,15 @@
RideNum
:
0
,
//出行人数
RideNum
:
0
,
//出行人数
CarClass
:
''
,
//车辆类型
CarClass
:
''
,
//车辆类型
RegionIds
:
''
,
//地区(省市区:1,2,3)
RegionIds
:
''
,
//地区(省市区:1,2,3)
}
},
params
:
{
//时间的配置
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
true
,
minute
:
true
,
},
}
}
},
},
created
()
{
created
()
{
...
@@ -150,7 +198,21 @@
...
@@ -150,7 +198,21 @@
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
let
myDate
=
new
Date
();
myDate
=
myDate
.
setDate
(
myDate
.
getDate
()
+
1
);
myDate
=
new
Date
(
myDate
);
let
obj
=
{}
obj
.
year
=
myDate
.
getFullYear
();
//年
obj
.
month
=
myDate
.
getMonth
()
+
1
;
//月
obj
.
day
=
myDate
.
getDate
();
//日
obj
.
hour
=
myDate
.
getHours
();
//时
obj
.
minute
=
myDate
.
getMinutes
();
//分
let
days
=
myDate
.
getDay
();
obj
.
week
=
this
.
getweek
(
days
)
//星期几
this
.
STime
=
obj
;
this
.
ETime
=
obj
;
this
.
msg
.
StartTime
=
obj
.
year
+
'-'
+
obj
.
month
+
'-'
+
obj
.
day
+
' '
+
obj
.
hour
+
':'
+
obj
.
minute
+
':00'
;
this
.
msg
.
EndTime
=
obj
.
year
+
'-'
+
obj
.
month
+
'-'
+
obj
.
day
+
' '
+
obj
.
hour
+
':'
+
obj
.
minute
+
':00'
;
},
},
onLoad
(
options
){
onLoad
(
options
){
this
.
init
()
//获取司导首页配置
this
.
init
()
//获取司导首页配置
...
@@ -203,12 +265,16 @@
...
@@ -203,12 +265,16 @@
}
}
);
);
},
},
radioChange
(
item
){
radioChange
(
item
){
//车辆类型
console
.
log
(
item
)
this
.
carName
=
item
.
Name
;
this
.
carName
=
item
.
Name
;
this
.
msg
.
CarClass
=
item
.
Id
;
this
.
msg
.
CarClass
=
item
.
Id
;
this
.
show
=
false
this
.
show
=
false
},
},
radioChange2
(
item
){
//出行类型
this
.
EnumName
=
item
.
Name
;
this
.
msg
.
CarType
=
item
.
Id
;
this
.
show2
=
false
},
scrollHandler
(
e
)
{
scrollHandler
(
e
)
{
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
//this.$forceUpdate();
//this.$forceUpdate();
...
@@ -220,8 +286,86 @@
...
@@ -220,8 +286,86 @@
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
,
delta
:
1
,
});
});
},
},
btnStart
(
val
){
if
(
this
.
timeType
==
1
){
//出行时间的选择
this
.
msg
.
StartTime
=
val
.
year
+
'-'
+
val
.
month
+
'-'
+
val
.
day
+
' '
+
val
.
hour
+
':'
+
val
.
minute
+
':00'
;
this
.
STime
=
val
let
myDate
=
new
Date
(
this
.
msg
.
StartTime
);
let
days
=
myDate
.
getDay
();
this
.
STime
.
week
=
this
.
getweek
(
days
)
}
else
{
//结束时间的选择
this
.
msg
.
EndTime
=
val
.
year
+
'-'
+
val
.
month
+
'-'
+
val
.
day
+
' '
+
val
.
hour
+
':'
+
val
.
minute
+
':00'
;
this
.
ETime
=
val
let
myDate
=
new
Date
(
this
.
msg
.
EndTime
);
let
days
=
myDate
.
getDay
();
this
.
ETime
.
week
=
this
.
getweek
(
days
)
}
let
startTime
=
new
Date
(
this
.
msg
.
StartTime
);
// 开始时间
let
endTime
=
new
Date
(
this
.
msg
.
EndTime
);
// 结束时间
if
(
startTime
.
getTime
()
>
endTime
.
getTime
()){
//如果开始时间大于结束时间吧结束时间赋值和开始时间一样
this
.
msg
.
EndTime
=
val
.
year
+
'-'
+
val
.
month
+
'-'
+
val
.
day
+
' '
+
val
.
hour
+
':'
+
val
.
minute
+
':00'
;
this
.
ETime
=
val
let
myDate
=
new
Date
(
this
.
msg
.
EndTime
);
let
days
=
myDate
.
getDay
();
this
.
ETime
.
week
=
this
.
getweek
(
days
)
this
.
intervalDay
=
''
}
else
{
let
usedTime
=
endTime
-
startTime
;
// 相差的毫秒数
let
days
=
Math
.
floor
(
usedTime
/
(
24
*
3600
*
1000
));
// 计算出天数
let
leavel
=
usedTime
%
(
24
*
3600
*
1000
);
// 计算天数后剩余的时间
let
hours
=
Math
.
floor
(
leavel
/
(
3600
*
1000
));
// 计算剩余的小时数
if
(
days
>
0
){
if
(
leavel
>
0
){
this
.
intervalDay
=
days
+
1
+
'天'
}
else
{
this
.
intervalDay
=
days
+
'天'
}
}
else
{
if
(
hours
>=
6
){
this
.
intervalDay
=
'1天'
}
else
{
this
.
intervalDay
=
'半天'
}
}
}
},
getweek
(
day
){
//根据值返回当前时间的星期几
if
(
day
==
1
){
return
'星期一'
}
else
if
(
day
==
2
){
return
'星期二'
}
else
if
(
day
==
3
){
return
'星期三'
}
else
if
(
day
==
4
){
return
'星期四'
}
else
if
(
day
==
5
){
return
'星期五'
}
else
if
(
day
==
6
){
return
'星期六'
}
else
if
(
day
==
0
){
return
'星期日'
}
},
openmap
(){
//打开地图选择详情地址
let
that
=
this
uni
.
chooseLocation
({
success
:
function
(
res
)
{
console
.
log
(
res
)
that
.
address
=
res
.
address
}
});
},
gocity
(){
uni
.
navigateTo
({
url
:
'/pages/guidecar/pickcarcity'
})
},
}
}
}
}
</
script
>
</
script
>
...
@@ -294,7 +438,7 @@
...
@@ -294,7 +438,7 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
15px
0
;
padding
:
15px
0
;
}
}
.guidecar
.topB
{
.guidecar
.topB
{
...
@@ -302,7 +446,7 @@
...
@@ -302,7 +446,7 @@
flex-direction
:
column
;
flex-direction
:
column
;
height
:
45px
;
height
:
45px
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
/* align-items: center; */
}
}
.guidecar
.titext
{
.guidecar
.titext
{
font-size
:
22
rpx
;
font-size
:
22
rpx
;
...
...
pages/guidecar/pickcarcity.vue
0 → 100644
View file @
83b6f712
<
template
>
<view
class=
"pickcarcity"
:style=
"
{'height':contentHeight}">
<view
class=
"qcity"
>
<view
class=
"ctrl-box"
>
<u-search
action-text=
"搜索"
:focus=
"true"
:clearabled=
"true"
:show-action=
"true"
radius=
"40"
v-model=
"searchKey"
@
search=
"searchHandler"
@
custom=
"searchHandler"
@
change=
"changeHandler"
></u-search>
</view>
<view
class=
"kaitong"
>
<div
style=
'width: 100%;'
><span
style=
'color: #9A9A9A;font-size: 12px;'
>
已开通城市
</span></div>
<view
v-for=
"(item, index) in RegionList"
:key=
"index"
class=
"region"
@
click=
"goback(item)"
>
{{
item
.
RegionName
}}
</view>
</view>
<template>
<u-index-list
:scrollTop=
"scrollTop"
>
<view
v-for=
"(item, index) in indexList"
:key=
"index"
>
<u-index-anchor
:index=
"item.ti"
/>
<view
class=
"list-cell"
v-for=
"(x,y) in item.children"
:key=
'y'
@
click=
"goback(x)"
>
{{
x
.
Name
}}
</view>
</view>
</u-index-list>
</
template
>
</view>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"取车城市"
,
scrollTop
:
0
,
contentHeight
:
0
,
mainColor
:
''
,
secondary
:
''
,
RegionList
:[],
cityList
:[],
searchKey
:
""
,
indexList
:
[{
ti
:
"A"
},
{
ti
:
"B"
},
{
ti
:
"C"
},
{
ti
:
"D"
},
{
ti
:
"E"
},
{
ti
:
"F"
},
{
ti
:
"G"
},{
ti
:
"H"
},
{
ti
:
"I"
},
{
ti
:
"J"
},
{
ti
:
"K"
},
{
ti
:
"L"
},
{
ti
:
"M"
},
{
ti
:
"N"
},
{
ti
:
"O"
},
{
ti
:
"P"
},{
ti
:
"Q"
},
{
ti
:
"R"
},
{
ti
:
"S"
},
{
ti
:
"T"
},
{
ti
:
"U"
},
{
ti
:
"V"
},
{
ti
:
"W"
},
{
ti
:
"X"
},
{
ti
:
"Y"
},
{
ti
:
"Z"
}
]
}
},
onLoad
(
option
){
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
init
()
//城市列表
this
.
getSiteRegionList
()
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
methods
:
{
init
(){
uni
.
showLoading
({
title
:
"加载中"
,
});
this
.
request2
(
{
url
:
'/api/AppletGuideCar/GetAllList'
,
data
:
{}
},
(
res
)
=>
{
this
.
cityList
=
res
.
data
;
this
.
indexList
.
forEach
(
x
=>
{
x
.
children
=
[];
this
.
cityList
.
forEach
(
j
=>
{
let
obj
=
{}
if
(
x
.
ti
==
j
.
PinYin
.
substr
(
0
,
1
)){
x
.
children
.
push
(
j
)
}
})
})
uni
.
hideLoading
();
}
);
},
getSiteRegionList
(){
this
.
request2
(
{
url
:
'/api/AppletGuideCar/GetSiteRegionList'
,
data
:
{}
},
(
res
)
=>
{
this
.
RegionList
=
res
.
data
}
);
},
onPageScroll
(
e
)
{
this
.
scrollTop
=
e
.
scrollTop
;
},
goback
(
item
){
console
.
log
(
item
)
},
searchHandler
(
val
){
console
.
log
(
val
)
},
changeHandler
(
val
)
{
},
}
}
</
script
>
<
style
>
.pickcarcity
{
background
:
#FFFFFF
;
}
.pickcarcity
.qcity
{
}
.pickcarcity
.list-cell
{
display
:
flex
;
box-sizing
:
border-box
;
width
:
100%
;
padding
:
10px
24
rpx
;
overflow
:
hidden
;
color
:
#323233
;
font-size
:
14px
;
line-height
:
24px
;
background-color
:
#fff
;
}
.pickcarcity
.anchor-text
{
color
:
red
;
}
.pickcarcity
.kaitong
{
width
:
100%
;
padding
:
15px
;
background
:
#FAF8F9
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
flex-wrap
:
wrap
;
}
.pickcarcity
.region
{
width
:
200
rpx
;
height
:
68
rpx
;
background
:
#fff
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
30
rpx
;
margin-top
:
30
rpx
;
}
.pickcarcity
.ctrl-box
{
padding
:
5px
10px
;
}
</
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