Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
e36a729a
Commit
e36a729a
authored
Jan 23, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7744eccb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
960 additions
and
70 deletions
+960
-70
header.vue
components/header/header.vue
+1
-1
details.vue
pages/coupon/details/details.vue
+0
-2
headerLine.vue
pages/jiuzhai/components/headerLine.vue
+0
-67
jz_Line copy.vue
pages/jiuzhai/jz_Line copy.vue
+959
-0
No files found.
components/header/header.vue
View file @
e36a729a
...
...
@@ -7,7 +7,7 @@
</view>
</view>
<view
class=
"carrHeader-title"
>
<slot>
{{
title
}}
</slot>
<slot>
{{
title
?
title
:
''
}}
</slot>
</view>
</view>
</view>
...
...
pages/coupon/details/details.vue
View file @
e36a729a
...
...
@@ -201,7 +201,6 @@
}
.couponDetailsHeadeBox
{
position
:
relative
;
/* position: fixed; */
width
:
100%
;
height
:
328
rpx
;
top
:
0
;
...
...
@@ -270,7 +269,6 @@
.cdTiaojian_box
{
padding
:
0
66
rpx
;
margin-top
:
143
rpx
;
/* margin-top: 480rpx; */
}
.cdTiaojianB
{
display
:
flex
;
...
...
pages/jiuzhai/components/headerLine.vue
deleted
100644 → 0
View file @
7744eccb
<
template
>
<view
class=
"lienHeader"
:style=
"[titleStyle]"
>
<view
class=
"lienHeaderBox"
>
<view
class=
"lienHeader-left"
>
<view
class=
"lienHeader-left-icon"
@
click=
"goBack"
>
<u-icon
name=
"arrow-left"
size=
"38"
:color=
"type==1?'#000':'#000'"
></u-icon>
</view>
</view>
<!--
<view
class=
"lienHeader-title"
:style=
"
{'color':type==1?'#FFF':'#000'}">
<slot>
{{
title
}}
</slot>
</view>
-->
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:[
'title'
,
'type'
],
data
()
{
return
{
titleStyle
:{}
}
},
mounted
()
{
const
that
=
this
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
titleStyle
=
{
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
};
},
});
},
methods
:{
goBack
(){
uni
.
navigateBack
({
delta
:
-
1
})
}
}
}
</
script
>
<
style
>
.lienHeader-title
{
width
:
100%
;
position
:
relative
;
left
:
0
;
right
:
0
;
text-align
:
center
;
font-size
:
32
rpx
;
}
.lienHeader-left
{
/* position: absolute;
left: 32rpx;
top: 83rpx;
z-index: 3; */
}
.lienHeaderBox
{
width
:
100%
;
height
:
88
rpx
;
padding
:
0
32
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
position
:
relative
;
}
.lienHeader
{
padding-top
:
48
rpx
;
}
</
style
>
\ No newline at end of file
pages/jiuzhai/jz_Line copy.vue
0 → 100644
View file @
e36a729a
<
style
>
.jz_LineHeadeBox
{
position
:
fixed
;
left
:
0
;
right
:
0
;
top
:
0
;
z-index
:
1
;
height
:
310
rpx
;
overflow
:
hidden
;
}
.jz_LineHeade
{
height
:
310
rpx
;
}
.jz_LineHeade.active1
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638731577133752446.png')
no-repeat
;
background-size
:
100%
auto
;
}
.jz_Line
{}
.jz_Content
{
margin
:
20
rpx
0
rpx
30
rpx
0
rpx
;
}
.jz_List
{
display
:
flex
;
justify-content
:
space-between
;
}
.jz_TuDiv
{
width
:
220
rpx
;
height
:
280
rpx
;
border-radius
:
12px
;
overflow
:
hidden
;
position
:
relative
;
}
.jz_TuDiv
.jz_TuBigImg
{
width
:
100%
;
height
:
100%
}
.jz_TuDiv
.none-image
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background-color
:
#ECF1F4
;
color
:
grey
;
font-size
:
28
rpx
;
font-family
:
'nav-font'
;
}
.jz_Right
{
width
:
432
rpx
;
margin-top
:
5px
;
font-size
:
14px
;
position
:
relative
;
}
.jz_LineName
{
color
:
#111111
;
font-size
:
30
rpx
;
font-weight
:
600
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
font-family
:
microsoft
yahei
ui
light
;
}
.jz_Canhoubu
{
color
:
#FF3166
;
margin-left
:
10px
;
}
.jz_redType
{
color
:
#FF3166
;
}
.jz_TuDivBotm
{
position
:
absolute
;
width
:
100%
;
height
:
18px
;
text-align
:
center
;
bottom
:
0
;
color
:
#fff
;
font-size
:
12px
;
line-height
:
18px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.3
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.op_remark
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.jz_ListMain
{
padding-bottom
:
10px
;
margin
:
0
30
rpx
;
border-bottom
:
1px
solid
#f1f1f1
;
margin-bottom
:
10px
;
}
.jz_TuDivBotm
img
{
width
:
12px
;
height
:
12px
;
margin-right
:
5px
;
}
.jz_calederImg
{
width
:
16px
;
height
:
16px
;
position
:
relative
;
top
:
2px
;
margin-right
:
5px
;
}
.jz_Sort
{
width
:
100%
;
margin
:
20px
0
;
}
.jz_SortItem
{
display
:
inline-block
;
width
:
25%
;
text-align
:
center
;
}
.Jz_tanchu
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background
:
#FFF
;
position
:
absolute
;
top
:
100px
;
left
:
0
;
z-index
:
1999
;
}
.Jz_tanchu_item
{
width
:
94%
;
margin-left
:
3%
;
height
:
45px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
#f1f1f1
;
}
.Jz_Mask
{
width
:
100%
;
height
:
100%
;
background
:
#000000
;
opacity
:
0.3
;
position
:
absolute
;
left
:
0
;
top
:
130px
;
z-index
:
999
;
}
.jz_Recommend
{
color
:
#999999
;
font-size
:
24
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
margin-top
:
10px
;
line-height
:
20px
;
}
.jz_Content
.search-box
{
height
:
88
rpx
;
background
:
#FFF
;
border-radius
:
18
rpx
;
display
:
flex
;
align-items
:
center
;
padding
:
19
rpx
30
rpx
;
margin
:
0
30
rpx
;
}
.jz_Content
.search-box
.date
{
height
:
50
rpx
;
font-size
:
28
rpx
;
font-weight
:
500
;
color
:
#111111
;
line-height
:
50
rpx
;
margin-right
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
border-right
:
1
rpx
solid
#E5E3E1
;
}
.jz_Content
.team-box
{
display
:
flex
;
align-items
:
stretch
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
}
.jz_Content
.team-box
:after
{
content
:
""
;
flex
:
auto
;
}
.jz_Content
.team-box
.team
{
width
:
calc
(
50%
-
30
rpx
);
background
:
#ECF1F4
;
border-radius
:
10
rpx
;
font-size
:
26
rpx
;
color
:
#999999
;
text-align
:
center
;
padding
:
20
rpx
;
margin-top
:
30
rpx
;
margin-right
:
30
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.jz_Content
.team-box
.team.active
{
background
:
#111111
;
color
:
#FFFFFF
;
}
.jz_Content
.team-box
.team
.team-content
{
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.jz_Content
.start-range-box
{
background
:
#ECF1F4
;
border-radius
:
10
rpx
;
margin-top
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
padding
:
20
rpx
;
}
.jz_Content
.start-range-box
.date-box
{
flex
:
1
;
font-weight
:
400
;
}
.jz_Content
.start-range-box
.split-box
{
color
:
#bbb
;
font-size
:
24
rpx
;
margin
:
0
20
rpx
}
.jz_Content
.start-range-box
.date-box.right
view
{
text-align
:
right
;
}
.jz_Content
.start-range-box
.date-box
.label
{
color
:
#bbb
;
font-size
:
24
rpx
;
}
.jz_Content
.start-range-box
.date-box
.chosen-date
{
color
:
#111
;
font-size
:
28
rpx
;
font-weight
:
600
;
}
.jz_Content
.start-city
{
display
:
inline-block
;
position
:
relative
;
}
.jz_Content
.start-city
text
{
position
:
relative
;
z-index
:
2
;
font-size
:
30
rpx
;
line-height
:
30
rpx
;
font-weight
:
500
;
color
:
#111
;
}
.jz_Content
.start-city
::after
{
background-color
:
#DFBE6E
;
height
:
6px
;
bottom
:
2px
;
left
:
0
;
right
:
0
;
position
:
absolute
;
z-index
:
1
;
display
:
block
;
content
:
' '
;
}
.jz_Content
.price
{
margin-top
:
10
rpx
;
font-weight
:
500
;
color
:
#111111
;
font-size
:
20
rpx
;
text-align
:
right
;
}
.jz_Content
.price
.money
{
font-size
:
36
rpx
;
color
:
#FF3166
;
font-family
:
nav-font
;
}
</
style
>
<
template
>
<div
class=
"jz_Line"
>
<view
class=
"jz_Content"
>
<view
class=
"jz_LineHeadeBox"
>
<view
class=
"jz_LineHeade"
:class=
"['active1']"
>
<headerLine
:type=
"msg.teamType"
:title=
"msg.teamType==1?'小包团':''"
></headerLine>
<view
class=
"search-box"
style=
"margin-top: 76rpx;"
>
<view
class=
"date"
@
click=
"showBranch=true"
>
<u-icon
name=
"location"
color=
"#B99846"
size=
"24"
></u-icon>
<text
style=
"margin-left: 20rpx;color: #B99846;"
>
{{
currentBrachName
}}
</text>
</view>
<view
style=
"width: 1px; flex: 1;"
>
<u-search
placeholder=
"关键字搜索"
v-model=
"msg.searchKey"
@
search=
"getList(1)"
input-align=
"left"
:value=
"msg.searchKey"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
:show-action=
"false"
></u-search>
</view>
</view>
</view>
<view
style=
"background-color: #FFF;"
>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
<u-dropdown-item
v-model=
"msg.orderBy"
:title=
"optionsTitle[0]"
:options=
"orderBys"
@
change=
"changeOrderBy"
>
</u-dropdown-item>
<u-dropdown-item
:title=
"optionsTitle[1]"
>
<view
class=
"slot-content"
style=
"padding:0 30rpx 30rpx 0;padding-top:0;background-color: #FFF;"
>
<view
style=
"height: 50vh;display: flex;"
>
<view
style=
"background-color: #f1f1f1;margin-right: 30rpx;height:100%"
>
<scroll-view
scroll-y=
"true"
style=
"height:100%"
>
<view
style=
"text-align: center; padding: 15px 0;"
>
<u-tag
mode=
"plain"
border-color=
"#DFBE6E"
color=
"#DFBE6E"
text=
"出境游"
size=
"mini"
></u-tag>
</view>
<template
v-for=
"x in lineList"
>
<view
:style=
"
{'background':x.LineID==currentLineId.LineID?'#FFF':'unset'}" @click="changeLineTeamsHandler(x)"
style="font-size: 15px;color:#111;padding:30rpx;text-align: center;" v-if="x.LineDirection==2" :key="x.LineID">
{{
x
.
LineShortName
}}
</view>
</
template
>
<view
style=
"text-align: center; padding: 15px 0;"
>
<u-tag
mode=
"plain"
border-color=
"#DFBE6E"
color=
"#DFBE6E"
text=
"当地游"
size=
"mini"
></u-tag>
</view>
<
template
v-for=
"x in lineList"
>
<view
:style=
"
{'background':x.LineID==currentLineId.LineID?'#FFF':'unset'}" @click="changeLineTeamsHandler(x)"
style="font-size: 15px;color:#111;padding:30rpx;text-align: center;" v-if="x.LineDirection==3" :key="x.LineID">
{{
x
.
LineShortName
}}
</view>
</
template
>
</scroll-view>
</view>
<view
style=
"flex:1;width:1px;height:100%"
>
<scroll-view
scroll-y=
"true"
style=
"height:100%"
v-if=
"currentLineId && currentLineId.PlaceList"
>
<view
style=
"text-align: right;"
>
<checkbox-group
@
change=
"allTeamsChangeHandler"
>
<label>
<checkbox
value=
"all"
:checked=
"allTeams"
style=
"transform: scale(0.7)"
/><text
style=
"font-size: 12px;"
>
全部系列
</text>
</label>
</checkbox-group>
</view>
<
template
v-for=
"(x,i) in currentLineId.PlaceList"
>
<view
style=
"padding-top:30rpx"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;"
>
{{
x
.
DestinationName
}}
</text>
</view>
<view
class=
"team-box"
>
<view
v-for=
"(y,yi) in x.Teams"
:key=
"yi"
class=
"team"
:class=
"
{'active':msg.team.indexOf(y.TeamId)!=-1}"
@click="setTeams(y.TeamId)">
<view
class=
"team-content"
>
{{
y
.
TeamName
}}
</view>
</view>
</view>
</
template
>
</scroll-view>
</view>
</view>
<view
style=
"box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;padding-left: 30rpx;"
>
<view
style=
"flex:1;margin-right: 30rpx;"
>
<u-button
:custom-style=
"btnStyle"
@
click=
"clearTeams"
>
清除
</u-button>
</view>
<view
style=
"flex:1;"
>
<u-button
:custom-style=
"btnStyle2"
@
click=
"changeTeams"
>
完成
</u-button>
</view>
</view>
</view>
</u-dropdown-item>
<u-dropdown-item
:title=
"optionsTitle[2]"
>
<view
class=
"slot-content"
style=
"padding: 30rpx;padding-top:0;background-color: #FFF;"
>
<scroll-view
scroll-y=
"true"
style=
"max-height: 50vh;"
>
<view
style=
"padding-top:30rpx"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;"
>
行程天数
</text>
</view>
<view
class=
"team-box"
>
<view
v-for=
"x in days"
class=
"team"
style=
"width:calc(25% - 30rpx);"
:class=
"{'active':msg.days.indexOf(x.day)!=-1}"
@
click=
"setDays(x.day)"
>
{{x.name}}
</view>
</view>
<view
style=
"padding-top:30rpx"
>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;"
>
出发日期
</text>
</view>
<view
class=
"start-range-box"
@
click=
"showTimePopup=true"
>
<view
class=
"date-box"
>
<view
class=
"label"
>
最早出发日期
</view>
<view
class=
"date"
style=
"font-weight: 400;"
v-if=
"msg.startDate==''"
>
选择日期
</view>
<view
class=
"date"
v-else
>
{{msg.startDate}}
</view>
</view>
<view
class=
"split-box"
>
-至-
</view>
<view
class=
"date-box right"
>
<view
class=
"label"
>
最晚出发日期
</view>
<view
class=
"date"
style=
"font-weight: 400;"
v-if=
"msg.endDate==''"
>
选择日期
</view>
<view
class=
"date"
v-else
>
{{msg.endDate}}
</view>
</view>
</view>
</scroll-view>
<view
style=
"box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;"
>
<view
style=
"flex:1;margin-right: 30rpx;"
>
<u-button
:custom-style=
"btnStyle"
@
click=
"clearDayAndDate"
>
清除
</u-button>
</view>
<view
style=
"flex:1;"
>
<u-button
:custom-style=
"btnStyle2"
@
click=
"changeDayAndDate"
>
完成
</u-button>
</view>
</view>
</view>
</u-dropdown-item>
<u-dropdown-item
v-model=
"msg.startCityId"
:title=
"optionsTitle[3]"
:options=
"startCitys"
@
change=
"changeStartCity"
>
</u-dropdown-item>
</u-dropdown>
</view>
</view>
<view
style=
"margin-top: 390rpx;"
>
<view
v-if=
"screenshow==true"
class=
"Jz_Mask"
@
click=
"screenshow=false"
></view>
<u-empty
v-if=
"dataList.length==0 && !loading"
text=
"暂无数据"
mode=
"data"
></u-empty>
<
template
v-else
>
<view
style=
"height: calc(100vh - 220px);overflow: hidden;"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
class=
"jz_ListMain"
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"goJzDetail(item)"
>
<view
class=
"jz_List"
>
<view
class=
"jz_TuDiv"
>
<img
class=
"jz_TuBigImg"
mode=
"aspectFill"
:src=
"getImgs(item.imgCover)"
alt=
""
v-if=
"item.imgCover && item.imgCover.length>0 && getImgs(item.imgCover)!=''"
/>
<view
class=
"none-image"
v-else
>
暂无图片
</view>
</view>
<view
class=
"jz_Right"
>
<view
class=
"jz_LineName"
>
{{
item
.
title
}}
</view>
<view
class=
"jz_Recommend"
v-if=
"item.productRecommend && item.productRecommend!='null'"
>
{{
item
.
productRecommend
}}
</view>
<view
style=
"margin:10px 0;display: flex;align-items: center;"
>
<view
class=
"start-city"
style=
"margin-right: 20rpx;"
v-if=
"item.startCityName"
>
<text>
{{
item
.
startCityName
}}
出发
</text>
</view>
<view
style=
"margin-right: 20rpx;"
v-if=
"item.companyUnions && item.companyUnions.length>1"
>
<u-tag
border-color=
"#DFBE6E"
color=
"#FFF"
bg-color=
"#DFBE6E"
text=
"多个出发城市"
size=
"mini"
></u-tag>
</view>
<view>
<u-tag
mode=
"plain"
border-color=
"#DFBE6E"
color=
"#DFBE6E"
:text=
"`$
{item.dayNum}天`" size="mini">
</u-tag>
</view>
</view>
<view
class=
"price"
style=
"display:flex;justify-content: space-between;align-items: center;"
>
<view
style=
"font-size:24rpx;color:#999999;"
>
最近团期:
{{
item
.
startDate
}}
</view>
</view>
<view
class=
"price"
style=
"text-align: unset;"
>
<text>
¥
</text>
<text
class=
"money"
>
{{
parseFloat
(
$utils
.
getretailer
()?
item
.
b2BPrice
:
item
.
b2CPrice
).
toFixed
(
2
)
}}
</text>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</
template
>
</view>
</view>
<auth
v-if=
"showAuth&&is_show_auth==1"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<u-picker
mode=
"time"
v-model=
"isShowDate"
@
confirm=
'getStratDate'
:params=
"params"
></u-picker>
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"90%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
</u-popup>
<u-picker
mode=
"selector"
v-model=
"showBranch"
:default-selector=
"[0]"
:range=
"branchList"
@
confirm=
'changeBranch'
range-key=
"BName"
></u-picker>
</div>
</template>
<
script
>
import
canlendar
from
"./components/time/index.vue"
import
auth
from
"@/components/auth/index.vue"
;
import
headerLine
from
"./components/headerLine"
;
export
default
{
components
:
{
canlendar
,
auth
,
headerLine
},
data
()
{
return
{
allTeams
:
false
,
loading
:
true
,
pageTitle
:
'线路'
,
showTimePopup
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
orderBy
:
""
,
team
:
[],
days
:
[
'<100'
],
startDate
:
''
,
endDate
:
''
,
startCityId
:
-
1
,
companyId
:
0
,
searchKey
:
''
,
//搜索数据
priceOrderByField
:
2
,
PlaceIds
:
''
,
lineId
:
0
,
teamType
:
""
,
//团队类型 1-小包团
},
time
:
''
,
currentLineId
:
null
,
params
:
{
year
:
true
,
month
:
true
,
day
:
true
,
hour
:
false
,
minute
:
false
,
second
:
false
},
btnStyle
:
{
borderRadius
:
'16rpx'
,
color
:
'#111'
,
fontSize
:
'30rpx'
,
width
:
'100%'
,
border
:
"1px solid #111"
,
background
:
"#FFF"
},
btnStyle2
:
{
borderRadius
:
'16rpx'
,
color
:
'#fff'
,
fontSize
:
'30rpx'
,
width
:
'100%'
,
background
:
"#111"
},
dataList
:
[],
//数据
isShowDate
:
false
,
orderBys
:
[],
lineList
:
[],
days
:
[{
name
:
"不限"
,
day
:
'<100'
},
{
name
:
"2日以下"
,
day
:
'<=2'
},
{
name
:
"3日"
,
day
:
'=3'
},
{
name
:
"4日"
,
day
:
'=4'
},
{
name
:
"5日"
,
day
:
'=5'
},
{
name
:
"6日"
,
day
:
'=6'
},
{
name
:
"7日"
,
day
:
'=7'
},
{
name
:
"8日以上"
,
day
:
'>=8'
}
],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
startCitys
:
[],
screenshow
:
false
,
status
:
"加载中"
,
page_count
:
0
,
branchList
:
[],
currentBrachName
:
""
,
showBranch
:
false
,
optionsTitle
:
[
"推荐排序"
,
"线路玩法"
,
"天数日期"
,
"出发城市"
],
CityId
:
0
,
showAuth
:
false
,
is_show_auth
:
0
,
//是否显示授权弹窗
b2bUser
:
{},
//同行信息
mallUserInfo
:
{},
};
},
created
()
{
uni
.
setNavigationBarTitle
({
title
:
"精品旅游线路"
})
},
onLoad
(
option
)
{
console
.
log
(
"option"
,
option
);
if
(
option
&&
option
.
LineTeamIds
)
{
let
NewArr
=
[];
NewArr
=
option
.
LineTeamIds
.
split
(
","
);
if
(
NewArr
.
length
>
0
)
{
NewArr
.
forEach
(
x
=>
{
this
.
msg
.
team
.
push
(
parseInt
(
x
));
})
}
}
else
if
(
option
&&
option
.
lineId
)
{
this
.
msg
.
lineId
=
option
.
lineId
;
}
if
(
option
&&
option
.
PlaceIds
)
{
this
.
msg
.
PlaceIds
=
option
.
PlaceIds
;
}
if
(
option
&&
option
.
teamType
&&
option
.
teamType
==
"1"
)
{
this
.
msg
.
teamType
=
option
.
teamType
;
}
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
1
)
{
this
.
is_show_auth
=
1
;
}
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
mallUserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
mallUserInfo
)
{
this
.
mallUserInfo
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
this
.
getLineQuery
();
},
methods
:
{
reloadUserinfo
()
{
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
mallUserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
allTeamsChangeHandler
(
e
)
{
this
.
allTeams
=
e
.
detail
.
value
.
length
>
0
if
(
this
.
allTeams
&&
this
.
msg
.
team
.
length
>
0
)
{
this
.
msg
.
team
=
[];
}
this
.
$forceUpdate
();
},
//线路切换
changeLineTeamsHandler
(
item
)
{
this
.
allTeams
=
false
;
this
.
currentLineId
=
item
;
this
.
msg
.
lineId
=
item
.
LineID
;
this
.
msg
.
PlaceIds
=
""
;
this
.
msg
.
team
=
[];
},
//获取查询条件
getLineQuery
()
{
let
customerInfo
=
uni
.
getStorageSync
(
"b2b_user"
)
this
.
apipost
(
"b2b_get_GetMiniAppTravelQuery"
,
{},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderBys
=
res
.
data
.
OrderByList
;
this
.
branchList
=
res
.
data
.
SiteList
;
this
.
startCitys
=
res
.
data
.
CityList
;
this
.
lineList
=
res
.
data
.
LineList
;
this
.
msg
.
companyId
=
this
.
branchList
[
0
].
BId
;
this
.
currentBrachName
=
this
.
branchList
[
0
].
BName
;
this
.
CityId
=
this
.
branchList
[
0
].
CityId
;
this
.
currentLineId
=
this
.
lineList
[
0
]
if
(
this
.
msg
.
lineId
!=
0
)
{
let
temp
=
this
.
lineList
.
find
(
x
=>
x
.
LineID
==
this
.
msg
.
lineId
)
if
(
temp
)
{
this
.
currentLineId
=
temp
this
.
optionsTitle
[
1
]
=
temp
.
LineShortName
}
else
{
this
.
currentLineId
=
this
.
lineList
[
0
]
}
}
else
{
this
.
currentLineId
=
this
.
lineList
[
0
]
}
if
(
customerInfo
&&
customerInfo
.
salesBaseInfo
)
{
let
tempCompany
=
this
.
branchList
.
find
(
x
=>
x
.
BId
==
customerInfo
.
salesBaseInfo
.
rB_Branch_id
)
if
(
tempCompany
&&
tempCompany
.
BId
)
{
this
.
msg
.
companyId
=
tempCompany
.
BId
this
.
currentBrachName
=
tempCompany
.
BName
}
}
}
this
.
research
();
},
null
);
},
changeBranch
(
val
)
{
this
.
msg
.
companyId
=
this
.
branchList
[
val
].
BId
this
.
currentBrachName
=
this
.
branchList
[
val
].
BName
this
.
CityId
=
this
.
branchList
[
val
].
CityId
;
this
.
research
();
},
setDays
(
day
)
{
if
(
day
==
'<100'
)
{
this
.
msg
.
days
=
[
'<100'
]
}
else
{
if
(
this
.
msg
.
days
.
indexOf
(
'<100'
)
!=
-
1
)
{
this
.
msg
.
days
.
splice
(
this
.
msg
.
days
.
indexOf
(
'<100'
),
1
)
}
let
temp
=
this
.
msg
.
days
.
indexOf
(
day
)
if
(
temp
==
-
1
)
{
this
.
msg
.
days
.
push
(
day
)
}
else
{
this
.
msg
.
days
.
splice
(
temp
,
1
)
}
}
},
clearDayAndDate
()
{
this
.
msg
.
days
=
[
'<100'
]
this
.
optionsTitle
[
2
]
=
'天数日期'
this
.
msg
.
startDate
=
''
this
.
msg
.
endDate
=
''
this
.
$forceUpdate
()
this
.
$refs
.
uDropdown
.
close
();
this
.
research
();
},
changeDayAndDate
()
{
let
temp
=
''
if
(
this
.
msg
.
days
.
indexOf
(
"<100"
)
==
-
1
)
{
this
.
msg
.
days
.
forEach
(
x
=>
{
this
.
days
.
forEach
(
y
=>
{
if
(
y
.
day
==
x
)
{
temp
+=
y
.
name
+
","
}
})
})
}
if
(
this
.
msg
.
startDate
!=
''
)
{
temp
+=
"最早:"
+
this
.
msg
.
startDate
+
","
}
if
(
this
.
msg
.
endDate
!=
''
)
{
temp
+=
"最早:"
+
this
.
msg
.
endDate
+
","
}
this
.
optionsTitle
[
2
]
=
temp
==
''
?
'天数日期'
:
temp
this
.
$forceUpdate
()
this
.
$refs
.
uDropdown
.
close
();
this
.
research
();
},
chosenDateResult
(
obj
)
{
this
.
msg
.
startDate
=
obj
.
start
;
this
.
msg
.
endDate
=
obj
.
end
;
this
.
showTimePopup
=
false
},
clearTeams
()
{
this
.
msg
.
team
=
[]
this
.
optionsTitle
[
1
]
=
'线路玩法'
this
.
currentLineId
=
null
this
.
msg
.
lineId
=
0
;
this
.
msg
.
PlaceIds
=
""
;
this
.
allTeams
=
false
this
.
$forceUpdate
()
this
.
$refs
.
uDropdown
.
close
();
this
.
research
();
},
changeTeams
()
{
if
(
this
.
msg
.
team
.
length
==
0
)
{
this
.
optionsTitle
[
1
]
=
'线路玩法'
if
(
this
.
allTeams
&&
this
.
currentLineId
)
{
this
.
optionsTitle
[
1
]
=
this
.
currentLineId
.
LineShortName
this
.
msg
.
lineId
=
this
.
currentLineId
.
LineID
}
}
else
{
let
temp
=
''
this
.
lineList
.
forEach
(
x
=>
{
x
.
PlaceList
.
forEach
(
y
=>
{
y
.
Teams
.
forEach
(
z
=>
{
if
(
this
.
msg
.
team
.
indexOf
(
z
.
TeamId
)
!=
-
1
)
{
temp
+=
z
.
TeamName
+
","
}
})
})
})
this
.
optionsTitle
[
1
]
=
temp
}
if
(
this
.
optionsTitle
[
1
]
==
''
)
{
this
.
optionsTitle
[
1
]
=
'线路玩法'
}
this
.
$forceUpdate
()
this
.
$refs
.
uDropdown
.
close
();
this
.
research
();
},
setTeams
(
teamId
)
{
this
.
msg
.
PlaceIds
=
""
;
let
id
=
teamId
let
temp
=
this
.
msg
.
team
.
indexOf
(
id
)
if
(
temp
==
-
1
)
{
this
.
msg
.
team
.
push
(
id
)
}
else
{
this
.
msg
.
team
.
splice
(
temp
,
1
)
}
if
(
this
.
allTeams
&&
this
.
msg
.
team
.
length
>
0
)
{
this
.
allTeams
=
false
this
.
msg
.
lineId
=
0
}
this
.
$forceUpdate
();
},
changeOrderBy
(
index
)
{
let
temp
=
this
.
orderBys
.
find
(
x
=>
{
if
(
x
.
value
==
index
)
{
return
x
}
else
{
return
false
}
})
this
.
optionsTitle
[
0
]
=
temp
.
label
this
.
msg
.
orderBy
=
temp
.
value
this
.
$forceUpdate
()
this
.
research
();
},
changeStartCity
(
index
)
{
if
(
index
==
-
1
)
{
this
.
optionsTitle
[
3
]
=
"出发城市"
this
.
msg
.
startCity
=
-
1
}
else
{
let
temp
=
this
.
startCitys
.
find
(
x
=>
{
if
(
x
.
value
==
index
)
{
return
x
}
else
{
return
false
}
})
this
.
optionsTitle
[
3
]
=
temp
.
label
+
"出发"
this
.
msg
.
startCity
=
temp
.
value
}
this
.
$forceUpdate
()
this
.
research
();
},
open
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
();
},
close
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
(
index
);
},
research
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
dataList
=
[];
this
.
getList
();
},
//获取数据
getList
(
type
)
{
if
(
type
==
1
)
{
this
.
dataList
=
[];
this
.
msg
.
pageIndex
=
1
;
}
if
(
this
.
msg
.
lineId
!=
0
&&
this
.
msg
.
team
.
length
>
0
)
{
this
.
msg
.
lineId
=
0
}
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
})
this
.
apipost
(
"b2b_get_GetLXYTravelPageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
let
format
=
this
.
getFormatUnionStartCityHandler
(
res
.
data
.
pageData
)
this
.
dataList
=
this
.
dataList
.
concat
(
format
);
this
.
page_count
=
res
.
data
.
pageCount
;
}
this
.
loading
=
false
uni
.
hideLoading
();
},
err
=>
{
this
.
loading
=
false
}
);
},
getFormatUnionStartCityHandler
(
data
)
{
data
.
forEach
(
x
=>
{
if
(
x
.
unionList
&&
x
.
unionList
.
length
>
0
)
{
let
companyUnions
=
x
.
unionList
.
filter
(
y
=>
y
.
unionBranchId
==
this
.
msg
.
companyId
)
if
(
companyUnions
&&
companyUnions
.
length
>
0
)
{
if
(
companyUnions
[
0
].
unionCityId
>
0
)
{
x
.
startCityId
=
companyUnions
[
0
].
unionCityId
x
.
startCityName
=
companyUnions
[
0
].
startCityName
}
else
{
let
tempCity
=
this
.
branchList
.
find
(
y
=>
y
.
BId
==
this
.
msg
.
companyId
)
if
(
tempCity
&&
tempCity
.
CityId
)
{
x
.
startCityId
=
tempCity
.
CityId
x
.
startCityName
=
tempCity
.
BName
.
replace
(
'站'
,
''
)
}
}
x
.
companyUnions
=
companyUnions
}
}
})
return
data
},
//获取日期
getStratDate
(
val
)
{
console
.
log
(
val
,
'val'
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getList
();
}
else
{
this
.
status
=
"nomore"
;
}
},
//跳转至详情
goJzDetail
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_LineDetail?tcid="
+
item
.
tcid
+
'&configId='
+
item
.
configId
+
'&cityId='
+
(
item
.
startCityId
?
item
.
startCityId
:
this
.
CityId
)
+
'&lineId='
+
this
.
msg
.
lineId
});
},
//获取第一张图
getImgs
(
imgObj
)
{
let
imgArr
=
JSON
.
parse
(
imgObj
);
if
(
imgArr
&&
imgArr
.
length
>
0
)
{
return
imgArr
[
0
].
Url
}
}
},
};
</
script
>
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