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
d71d60e9
Commit
d71d60e9
authored
Jun 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
87b24924
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
29 deletions
+56
-29
uni-calendar.vue
pages/ticketCoupons/components/uni-calendar/uni-calendar.vue
+0
-3
detail.vue
pages/ticketCoupons/detail.vue
+56
-26
No files found.
pages/ticketCoupons/components/uni-calendar/uni-calendar.vue
View file @
d71d60e9
...
@@ -150,7 +150,6 @@
...
@@ -150,7 +150,6 @@
selected
(
newVal
)
{
selected
(
newVal
)
{
this
.
cale
.
setSelectInfo
(
this
.
nowDate
.
fullDate
,
newVal
)
this
.
cale
.
setSelectInfo
(
this
.
nowDate
.
fullDate
,
newVal
)
this
.
weeks
=
this
.
cale
.
weeks
this
.
weeks
=
this
.
cale
.
weeks
console
.
log
(
this
.
weeks
)
}
}
},
},
created
()
{
created
()
{
...
@@ -166,14 +165,12 @@
...
@@ -166,14 +165,12 @@
// this.cale.setDate(this.date)
// this.cale.setDate(this.date)
this
.
init
(
this
.
date
)
this
.
init
(
this
.
date
)
// this.setDay
// this.setDay
console
.
log
(
169
,
this
.
cale
)
},
},
methods
:
{
methods
:
{
// 取消穿透
// 取消穿透
clean
()
{},
clean
()
{},
bindDateChange
(
e
)
{
bindDateChange
(
e
)
{
const
value
=
e
.
detail
.
value
+
'-1'
const
value
=
e
.
detail
.
value
+
'-1'
console
.
log
(
this
.
cale
.
getDate
(
value
));
this
.
init
(
value
)
this
.
init
(
value
)
},
},
/**
/**
...
...
pages/ticketCoupons/detail.vue
View file @
d71d60e9
...
@@ -88,24 +88,24 @@
...
@@ -88,24 +88,24 @@
门票
门票
<text
class=
"ticket-title-bg"
></text>
<text
class=
"ticket-title-bg"
></text>
</view>
</view>
<view
class=
"ticket-navs"
>
<view
class=
"ticket-navs"
v-if=
"TicketList.length>0"
>
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===1}"
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===1}"
@click="changeCheckTicketNavIndex(1)" v-if="haveticket[0]">
@click="changeCheckTicketNavIndex(1)" v-if="haveticket[0]
.date
">
{{
haveticket
[
0
].
date
}}
{{
haveticket
[
0
].
date
}}
</view>
</view>
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===2}"
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===2}"
@click="changeCheckTicketNavIndex(2)" v-if="haveticket[1]">
@click="changeCheckTicketNavIndex(2)" v-if="haveticket[1]
.date
">
{{
haveticket
[
1
].
date
}}
{{
haveticket
[
1
].
date
}}
</view>
</view>
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===3}"
<view
class=
"ticket-nav"
:class=
"
{'check-ticket-nav':checkTicketNavIndex===3}"
@click="changeCheckTicketNavIndex(3)">
@click="changeCheckTicketNavIndex(3)">
{{
otherDate
}}
{{
otherDate
}}
</view>
</view>
<calendar
ref=
"calendar"
:insert=
"false"
:selected=
"calendar"
@
confirm=
"confirm"
></calendar>
<calendar
ref=
"calendar"
:insert=
"false"
:selected=
"calendar"
@
confirm=
"confirm"
@
monthSwitch=
"changeMonth"
></calendar>
</view>
</view>
<view>
<view>
<view
class=
"no-data"
v-if=
"
details.meal
List.length===0"
>
<view
class=
"no-data"
v-if=
"
Ticket
List.length===0"
>
<image
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
mode=
"aspectFit"
class=
"no-data-img"
></image>
mode=
"aspectFit"
class=
"no-data-img"
></image>
...
@@ -113,9 +113,9 @@
...
@@ -113,9 +113,9 @@
暂无数据
暂无数据
</view>
</view>
</view>
</view>
<view
v-for=
"(item,index) in
details.meal
List"
:key=
"index"
class=
"ticket-list-box"
<view
v-for=
"(item,index) in
Ticket
List"
:key=
"index"
class=
"ticket-list-box"
:class=
"
{'last-item':index==
details.meal
List.length-1}"
:class=
"
{'last-item':index==
Ticket
List.length-1}"
v-if="
details.meal
List.length>0">
v-if="
Ticket
List.length>0">
<view
class=
"ticket-key"
>
<view
class=
"ticket-key"
>
{{
item
.
Key
}}
{{
item
.
Key
}}
</view>
</view>
...
@@ -286,7 +286,8 @@
...
@@ -286,7 +286,8 @@
Up
:
0
,
Up
:
0
,
nearbyType
:
0
,
nearbyType
:
0
,
scenicArr
:
[],
//推荐景点
scenicArr
:
[],
//推荐景点
haveticket
:[],
//最近3天的票
haveticket
:[{
date
:
""
},{
date
:
""
}],
//最近3天的票
TicketList
:[]
}
}
},
},
onShareTimeline
()
{
onShareTimeline
()
{
...
@@ -379,15 +380,24 @@
...
@@ -379,15 +380,24 @@
this
.
Date
=
today
this
.
Date
=
today
this
.
calendar
.
date
=
today
this
.
calendar
.
date
=
today
this
.
getRecomHotel
();
this
.
getRecomHotel
();
this
.
getGoodsprice
();
this
.
getGoodsprice
(
this
.
Date
);
},
},
methods
:
{
methods
:
{
//选择其他日期门票
//选择其他日期门票
confirm
(
e
)
{
confirm
(
e
)
{
if
(
e
.
fulldate
==
this
.
haveticket
[
0
].
date
){
this
.
checkTicketNavIndex
=
1
this
.
otherDate
=
'其他日期'
}
else
if
(
e
.
fulldate
==
this
.
haveticket
[
1
].
date
){
this
.
checkTicketNavIndex
=
2
this
.
otherDate
=
'其他日期'
}
else
{
this
.
otherDate
=
e
.
fulldate
}
this
.
Date
=
e
.
fulldate
this
.
Date
=
e
.
fulldate
// this.calendar[0].date = e.fulldate
// this.calendar[0].date = e.fulldate
this
.
otherDate
=
e
.
fulldate
this
.
getDetailByDate
();
this
.
getDetailByDate
();
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
...
@@ -422,6 +432,13 @@
...
@@ -422,6 +432,13 @@
res
.
data
.
ScenicSpotTag
=
res
.
data
.
ScenicSpotTag
.
split
(
','
)
res
.
data
.
ScenicSpotTag
=
res
.
data
.
ScenicSpotTag
.
split
(
','
)
res
.
data
.
GeographicTag
=
res
.
data
.
GeographicTag
.
split
(
','
)
res
.
data
.
GeographicTag
=
res
.
data
.
GeographicTag
.
split
(
','
)
this
.
details
=
res
.
data
;
this
.
details
=
res
.
data
;
if
(
res
.
data
.
newMealList
.
length
>
0
){
this
.
TicketList
=
[]
this
.
TicketList
=
res
.
data
.
newMealList
[
0
].
MealList
this
.
haveticket
[
0
].
date
=
res
.
data
.
newMealList
[
0
].
DayStr
this
.
haveticket
[
1
].
date
=
res
.
data
.
newMealList
[
1
].
DayStr
}
}
}
},
},
err
=>
{
err
=>
{
...
@@ -440,11 +457,12 @@
...
@@ -440,11 +457,12 @@
},
},
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
details
.
meal
List
=
res
.
data
;
this
.
Ticket
List
=
res
.
data
;
}
}
}
}
);
);
},
},
changeHandler
(
i
)
{
changeHandler
(
i
)
{
this
.
active
=
i
;
this
.
active
=
i
;
},
},
...
@@ -474,10 +492,10 @@
...
@@ -474,10 +492,10 @@
name
,
name
,
// address:"",
// address:"",
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
)
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
console
.
log
(
err
)
}
}
})
})
},
},
...
@@ -497,6 +515,7 @@
...
@@ -497,6 +515,7 @@
// }
// }
// let today = year + '-' + month + '-' + day
// let today = year + '-' + month + '-' + day
// this.Date = today
// this.Date = today
this
.
otherDate
=
'其他日期'
this
.
Date
=
this
.
haveticket
[
0
].
date
this
.
Date
=
this
.
haveticket
[
0
].
date
this
.
getDetailByDate
()
this
.
getDetailByDate
()
this
.
$forceUpdate
()
this
.
$forceUpdate
()
...
@@ -514,6 +533,7 @@
...
@@ -514,6 +533,7 @@
// }
// }
// let tomorrow = year + '-' + month + '-' + day
// let tomorrow = year + '-' + month + '-' + day
// this.Date = tomorrow
// this.Date = tomorrow
this
.
otherDate
=
'其他日期'
this
.
Date
=
this
.
haveticket
[
1
].
date
this
.
Date
=
this
.
haveticket
[
1
].
date
this
.
getDetailByDate
()
this
.
getDetailByDate
()
this
.
$forceUpdate
()
this
.
$forceUpdate
()
...
@@ -529,12 +549,12 @@
...
@@ -529,12 +549,12 @@
changeNearbyType
(
t
)
{
changeNearbyType
(
t
)
{
this
.
nearbyType
=
t
this
.
nearbyType
=
t
},
},
getGoodsprice
()
{
getGoodsprice
(
date
)
{
this
.
request2
({
this
.
request2
({
url
:
'/api/AppletDining/GetMonthTicketList'
,
url
:
'/api/AppletDining/GetMonthTicketList'
,
data
:
{
data
:
{
TicketID
:
0
,
TicketID
:
0
,
BuyDate
:
this
.
D
ate
,
BuyDate
:
d
ate
,
TicketCounponID
:
this
.
ID
TicketCounponID
:
this
.
ID
}
}
},
},
...
@@ -546,7 +566,6 @@
...
@@ -546,7 +566,6 @@
// info: ''
// info: ''
// }],
// }],
this
.
calendar
=
[]
this
.
calendar
=
[]
this
.
haveticket
=
[]
let
now
=
new
Date
();
let
now
=
new
Date
();
now
.
setHours
(
0
);
//设置小时
now
.
setHours
(
0
);
//设置小时
now
.
setMinutes
(
0
);
//设置分钟
now
.
setMinutes
(
0
);
//设置分钟
...
@@ -561,16 +580,9 @@
...
@@ -561,16 +580,9 @@
// info:"有票",
// info:"有票",
}
}
this
.
calendar
.
push
(
obj
)
this
.
calendar
.
push
(
obj
)
if
(
this
.
haveticket
.
length
<
3
){
this
.
haveticket
.
push
({
...
obj
,...
i
})
}
}
}
})
})
console
.
log
(
571
,
this
.
haveticket
)
}
}
}
}
...
@@ -594,7 +606,6 @@
...
@@ -594,7 +606,6 @@
},
},
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'推荐景点'
);
this
.
scenicArr
=
[];
this
.
scenicArr
=
[];
let
tempHotel
=
res
.
data
.
pageData
;
let
tempHotel
=
res
.
data
.
pageData
;
tempHotel
.
forEach
(
x
=>
{
tempHotel
.
forEach
(
x
=>
{
...
@@ -606,8 +617,27 @@
...
@@ -606,8 +617,27 @@
}
}
);
);
},
},
changeMonth
(
val
){
let
now
=
new
Date
();
now
.
setDate
(
1
);
now
.
setHours
(
0
);
//设置小时
now
.
setMinutes
(
0
);
//设置分钟
now
.
setSeconds
(
0
);
//设置秒
now
.
setMilliseconds
(
0
);
//设置毫妙
let
curMonth
=
now
.
getTime
();
let
chooseYear
=
val
.
year
let
chooseMonth
=
val
.
month
if
(
chooseMonth
<
10
){
chooseMonth
=
'0'
+
chooseMonth
}
let
date
=
chooseYear
+
'-'
+
chooseMonth
+
'-01'
let
changeMonth
=
Date
.
parse
(
date
);
if
(
changeMonth
>=
curMonth
){
this
.
getGoodsprice
(
date
)
}
}
}
}
}
}
</
script
>
</
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