Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TripFriend
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
TripFriend
Commits
d9d442f7
Commit
d9d442f7
authored
Feb 19, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
9a735de5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
238 additions
and
32 deletions
+238
-32
app.wxss
app.wxss
+7
-0
index.js
pages/index/index.js
+25
-3
index.wxml
pages/index/index.wxml
+21
-16
index.wxss
pages/index/index.wxss
+35
-6
tripDay.js
pages/index/tripDay/tripDay.js
+28
-3
tripDay.json
pages/index/tripDay/tripDay.json
+3
-1
tripDay.wxml
pages/index/tripDay/tripDay.wxml
+71
-2
tripDay.wxss
pages/index/tripDay/tripDay.wxss
+48
-1
No files found.
app.wxss
View file @
d9d442f7
...
...
@@ -29,6 +29,10 @@
.c66{
color:#666666;
}
.red{
color:#FF3166
}
.text1 {
overflow: hidden;
text-overflow: ellipsis;
...
...
@@ -52,4 +56,7 @@
}
.right{
text-align: right;
}
.bold{
font-weight: 700;
}
\ No newline at end of file
pages/index/index.js
View file @
d9d442f7
...
...
@@ -27,7 +27,9 @@ Page({
todayList
:[],
contactState
:
true
,
contactInfo
:{},
airState
:
false
,
airState
:
true
,
configId
:
''
,
tcid
:
''
,
},
//事件处理函数
bindViewTap
:
function
()
{
...
...
@@ -73,12 +75,30 @@ Page({
}
that
.
getData
();
},
tripDay
(
e
){
let
that
=
this
;
let
info
=
e
.
currentTarget
.
dataset
.
item
;
console
.
log
(
"info"
,
info
)
wx
.
navigateTo
({
url
:
'/pages/index/tripDay/tripDay?ConfigId='
+
that
.
data
.
configId
+
"&TCID="
+
that
.
data
.
tcid
+
"&DayNum="
+
info
.
DayNum
})
},
makePhone
(
e
){
let
phone
=
e
.
currentTarget
.
dataset
.
item
.
MobilePhone
;
wx
.
makePhoneCall
({
phoneNumber
:
phone
,
})
},
seeFight
(){
this
.
setData
({
airState
:
false
,
})
},
closeAir
(
e
)
{
this
.
setData
({
airState
:
true
,
})
},
closeState
(
e
){
this
.
setData
({
contactState
:
true
,
...
...
@@ -144,9 +164,11 @@ Page({
this
.
setData
({
dataInfo
:
res
,
todayMsg
:
todayMsg
todayMsg
:
todayMsg
,
configId
:
res
.
configId
,
tcid
:
res
.
tcid
})
console
.
log
(
"dataInfo"
,
this
.
data
.
dataInfo
.
FlightList
)
console
.
log
(
"dataInfo"
,
this
.
data
.
dataInfo
)
this
.
getToday
();
}).
catch
(
err
=>
{
})
},
...
...
pages/index/index.wxml
View file @
d9d442f7
...
...
@@ -49,7 +49,7 @@
</view>
<view class="timeView">
<view style="font-size:30rpx;font-weight:700;padding-left:30rpx">重要时间</view>
<swiper class="swiper-box" style="height:240rpx" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<swiper
bindtap="seeFight"
class="swiper-box" style="height:240rpx" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block>
<swiper-item style="padding: 0 30rpx;box-sizing: border-box;">
<view class="item">
...
...
@@ -133,7 +133,7 @@
<view class="XcView">
<view style="font-size:30rpx;font-weight:700;padding-left:30rpx">行程概览</view>
<scroll-view scroll-x class="scroll-header">
<view wx:for="{{dataInfo.JourneyDayImgList}}" wx:key="index" class="scroll-view-item">
<view
bindtap="tripDay" data-item="{{item}}"
wx:for="{{dataInfo.JourneyDayImgList}}" wx:key="index" class="scroll-view-item">
<image class="img" wx:if="{{item.Images.Url && item.Images.Url!=''}}" src="{{item.Images.Url}}"></image>
<image wx:else src="../../images/index/default.png"></image>
<text style="color:#fff;font-size:36rpx;font-weight:700">Day{{item.DayNum}}</text>
...
...
@@ -217,22 +217,27 @@
</view>
<!-- 航班详情 -->
<view catchtap="close
State
" data-self="self" hidden="{{airState}}" class="ContactTc AirTc">
<view catchtap="noThing" data-self="no" class="contentView">
<view catchtap="close
Air
" data-self="self" hidden="{{airState}}" class="ContactTc AirTc">
<view catchtap="noThing" data-self="no" class="contentView
1
">
<image class="photo" src="../../images/index/air.png"></image>
<view style="padding-top:85rpx">
<view class="title"><text>去程</text></view>
<view class="fightitem">
<view style="width:120rpx" class="time f32 right">00:35</view>
<view style="width:240rpx;position:relative;top:15rpx" class="hr f22 c66 center">韩亚航空 OZ324(OK)</view>
<view style="width:120rpx" class="time f32 left">00:35</view>
</view>
<view class="fightitem">
<view style="width:120rpx" class="time f24 right ">00:35</view>
<view style="width:240rpx" class="hr f22 c66">
<image style="width:100%;height:8rpx" src="../../images/index/hr.png"></image>
<view class="Content" style="padding-top:85rpx">
<view wx:for="{{dataInfo.FlightList}}" wx:key="index">
<view class="title">
<text>{{item.FlightDate}}</text>
</view>
<view class="fightitem">
<view style="width:120rpx" class="time f32 right">{{item.Departure_time}}</view>
<view style="width:240rpx;position:relative;top:15rpx" class="hr f22 c66 center">{{item.AlName}} {{item.Flight_number}}</view>
<view style="width:120rpx" class="time f32 left">{{item.Arrival_time}}</view>
</view>
<view class="fightitem">
<view style="width:120rpx" class="time f24 right ">{{item.DepartureName}}</view>
<view style="width:240rpx" class="hr f22 c66">
<image style="width:100%;height:8rpx" src="../../images/index/hr.png"></image>
<view wx:if="item.StopoverName && item.StopoverName!=''" class="red f20 center ">{{item.StopoverName}}</view>
</view>
<view style="width:120rpx" class="time f24 left">{{item.ArrivalCityName}}</view>
</view>
<view style="width:120rpx" class="time f24 left">00:35</view>
</view>
</view>
...
...
pages/index/index.wxss
View file @
d9d442f7
...
...
@@ -56,6 +56,7 @@
white-space: nowrap;
padding: 30rpx;
box-sizing: border-box;
color:#fff;
}
.headView .scroll-header .scroll-view-item {
...
...
@@ -243,6 +244,7 @@
width: 100%;
padding-left: 290rpx;
box-sizing: border-box;
text-align: left;
}
.toDayView .daka{
width:128rpx;
...
...
@@ -327,29 +329,56 @@
margin-left: 15rpx;
}
.AirTc .contentView{
.AirTc .contentView
1
{
text-align: left;
padding: 0 30rpx;
box-sizing: border-box;
background:rgba(255,255,255,1);
border-radius:20rpx;
height:670rpx;
}
.AirTc .contentView .title{
.AirTc .contentView1 .photo{
width:150rpx;
height:150rpx;
border-radius:50%;
top: -75rpx;
position: absolute;
left: 200rpx;
z-index: 100000;
}
.AirTc .contentView1 .Content{
height:574rpx;
overflow: scroll;
}
.AirTc .contentView1 .title{
margin-bottom: 15rpx;
}
.AirTc .contentView .title text{
.AirTc .contentView
1
.title text{
padding: 8rpx 20rpx;
background:rgba(255,49,102,0.3);
border-radius:26rpx;
font-size: 22rpx;
}
.AirTc .contentView .fightitem{
.AirTc .contentView
1
.fightitem{
display: flex;
justify-content: space-around;
}
.AirTc .contentView .fightitem>view{
.AirTc .contentView
1
.fightitem>view{
display: inline-block;
}
.AirTc .contentView .fightitem .hr{
.AirTc .contentView
1
.fightitem .hr{
padding: 0 10rpx;
box-sizing: border-box;
position: relative;
}
.AirTc .contentView1{
position: absolute;
width:560rpx;
margin: auto;
left: 0;
top: 0;
bottom: 0;
right: 0;
padding-bottom: 20rpx;
}
pages/index/tripDay/tripDay.js
View file @
d9d442f7
// pages/index/tripDay/tripDay.js
const
app
=
getApp
()
Page
({
/**
* 页面的初始数据
*/
data
:
{
msg
:{
ConfigId
:
'4265'
,
DayNum
:
'1'
,
TCID
:
'7003'
,
},
dataInfo
:{},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
"options"
,
options
)
let
that
=
this
;
let
msg
=
that
.
data
.
msg
;
if
(
options
.
ConfigId
){
msg
.
ConfigId
=
options
.
ConfigId
;
msg
.
DayNum
=
options
.
DayNum
;
msg
.
TCID
=
options
.
TCID
;
that
.
setData
({
msg
:
msg
})
}
that
.
getData
()
},
getData
(){
let
msg
=
this
.
data
.
msg
app
.
$api
(
'b2b_get_GetMXYTravelJourneyInfo'
,
msg
).
then
(
res
=>
{
this
.
setData
({
dataInfo
:
res
})
console
.
log
(
"dataInfo"
,
this
.
data
.
dataInfo
)
}).
catch
(
err
=>
{
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
pages/index/tripDay/tripDay.json
View file @
d9d442f7
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"行程概览"
,
"navigationStyle"
:
"default"
}
\ No newline at end of file
pages/index/tripDay/tripDay.wxml
View file @
d9d442f7
<!--pages/index/tripDay/tripDay.wxml-->
<text>pages/index/tripDay/tripDay.wxml</text>
<view class="tripDay">
<view class="title">
<text class="f32">第{{dataInfo.dayNum}}天</text>
<!-- <text class="f22">2020-03-11</text> -->
</view>
<view wx:for="{{dataInfo.dayArray}}" wx:key="index" class="content">
<view wx:if="{{item.Type==1}}" class="common head f24">
<text class="circle"></text>
<view class="bold">交通</view>
<view style="margin-top:12rpx" wx:if="{{item.childItem.SubTraffic}}">
<view wx:for="{{item.childItem.SubTraffic}}" wx:for-item="trac" wx:key="index">
<text>{{trac.StartCityName}}</text>
<text style="margin:0 15rpx">至</text>
<text>{{trac.ArrivalCityName}}</text>
</view>
</view>
</view>
<view wx:if="{{item.Type==7}}" class="common head f24">
<text class="circle"></text>
<view class="bold">{{item.childItem.Title}}</view>
</view>
<view wx:if="{{item.Type==2}}" class="common head f24">
<text class="circle"></text>
<view>
<text class="f22 c99">景点</text>
<text style="margin:0 6rpx 0 30rpx" class="f26 bold">{{item.childItem.CouponsName}}</text>
<text wx:if="{{item.childItem.PlayTimeHour && item.childItem.PlayTimeHour!=''}}" class="f22 c99">{{item.childItem.PlayTimeHour}}小时</text>
<text wx:if="{{item.childItem.PlayTimeMinutes && item.childItem.PlayTimeMinutes!=''}}" class="f22 c99">{{item.childItem.PlayTimeMinutes}}分钟</text>
</view>
<view wx:for="{{item.childItem.ImaArray}}" wx:key="index" wx:for-item="img" class="img">
<image wx:if="{{img.Url && img.Url!=''}}" src="{{img.Url}}"></image>
<image wx:else src="../../../images/index/default.png"></image>
</view>
<view>
{{item.childItem.Description}}
</view>
</view>
<view wx:if="{{item.Type==3}}" class="common head f24">
<text class="circle"></text>
<view>
<text class="f22 c99">住宿</text>
<text style="margin:0 6rpx 0 30rpx" class="f26 bold">{{item.childItem.NewHotelName}}</text>
</view>
<view wx:for="{{item.childItem.ImaArray}}" wx:key="index" wx:for-item="img" class="img">
<image wx:if="{{img.Url && img.Url!=''}}" src="{{img.Url}}"></image>
<image wx:else src="../../../images/index/default.png"></image>
</view>
<view style="margin-top:15rpx">
{{item.childItem.HotelNewDescriptionText}}
</view>
</view>
<view wx:if="{{item.Type==6}}" class="common head f24">
<!-- <text class="circle"></text> -->
<view class="bold" style="color:#FF3166">温馨提示</view>
<view style="margin-top:15rpx">
<rich-text nodes="{{item.childItem.Description}}"></rich-text>
</view>
</view>
<view wx:if="{{item.Type==4}}" class="common head f24">
<text class="circle"></text>
<view>
<text class="f22 c99">餐饮</text>
<text style="margin:0 6rpx 0 30rpx" class="f26 bold">
{{item.childItem.DinnerName}}
</text>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/index/tripDay/tripDay.wxss
View file @
d9d442f7
/* pages/index/tripDay/tripDay.wxss */
\ No newline at end of file
.tripDay{
width: 100%;
box-sizing: border-box;
padding: 0 30rpx;
margin-bottom: 20rpx;
}
.tripDay .title{
height:90rpx;
line-height:90rpx;
background:linear-gradient(90deg,rgba(255,49,102,0.3),rgba(255,49,102,0.05));
border-radius:20rpx;
display: flex;
padding: 0 30rpx;
box-sizing: border-box;
color:#FF3166;
justify-content: space-between;
}
.content{
padding-left: 30rpx;
width: 100%;
box-sizing: border-box;
}
.common{
position: relative;
padding: 30rpx 0 30rpx 40rpx;
border-left: 2px solid #FFC2D2;
}
.common .circle{
width:16rpx;
height:16rpx;
background:rgba(255,49,102,1);
border-radius:50%;
display: block;
position: absolute;
left: -8rpx;
top: 36rpx;
}
.common .img{
width:626rpx;
height:384rpx;
border-radius:20rpx;
margin-top:30rpx;
overflow: hidden;
margin-bottom: 10rpx;
}
.common .img image{
width: 100%;
}
\ No newline at end of file
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