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
06177901
Commit
06177901
authored
Jun 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d71d60e9
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
233 additions
and
180 deletions
+233
-180
smh-address-indexed.vue
pages/hotel/components/address/smh-address-indexed.vue
+1
-1
hotel-good.vue
pages/hotel/components/hotel-good.vue
+3
-3
near-good.vue
pages/hotel/components/near-good.vue
+3
-1
recommed-hotel.vue
pages/hotel/components/recommed-hotel.vue
+1
-1
room-good.vue
pages/hotel/components/room-good.vue
+14
-1
detail.vue
pages/hotel/detail.vue
+21
-19
list.vue
pages/hotel/list.vue
+1
-2
smh-address-indexed.vue
pages/restaurant/components/address/smh-address-indexed.vue
+1
-1
recommed-hotel.vue
pages/restaurant/components/recommed-hotel.vue
+1
-6
restaurant-type.vue
pages/restaurant/components/restaurant-type.vue
+1
-17
detail.vue
pages/restaurant/detail.vue
+3
-2
list.vue
pages/restaurant/list.vue
+3
-7
picture.vue
pages/restaurant/picture.vue
+48
-23
smh-address-indexed.vue
.../ticketCoupons/components/address/smh-address-indexed.vue
+1
-1
recommed-hotel.vue
pages/ticketCoupons/components/recommed-hotel.vue
+0
-1
detail.vue
pages/ticketCoupons/detail.vue
+7
-1
imgList.vue
pages/ticketCoupons/imgList.vue
+121
-87
list.vue
pages/ticketCoupons/list.vue
+3
-6
No files found.
pages/hotel/components/address/smh-address-indexed.vue
View file @
06177901
...
...
@@ -153,7 +153,7 @@
}
.scroll-view2
{
width
:
40rpx
;
height
:
90vh
;
height
:
100%
;
padding-bottom
:
30rpx
;
.right
{
width
:
100%
;
...
...
pages/hotel/components/hotel-good.vue
View file @
06177901
...
...
@@ -10,7 +10,7 @@
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view
class=
"rate"
v-if=
"item.Star>=1&&item.Star
<
=
5
"
>
<u-rate
active-color=
"#FEB969"
inactive-color=
"#b2b2b2"
:current=
"item.Star"
active-icon=
"star"
inactive-icon=
"star"
disabled
></u-rate>
<text
style=
"margin-left: 20rpx;vertical-align: top;"
>
{{
item
.
Star
+
'
.0
'
}}
</text>
<text
style=
"margin-left: 20rpx;vertical-align: top;"
>
{{
item
.
Star
+
'
星
'
}}
</text>
</view>
<view
class=
"other-rate"
v-if=
"item.Star==9"
>
<text>
温泉酒店
</text>
...
...
@@ -54,11 +54,11 @@
},
data
()
{
return
{
key
:
value
}
},
created
()
{
console
.
log
(
this
.
HotelList
,
'hotel'
);
//
console.log(this.HotelList, 'hotel');
},
methods
:{
goHotelDetail
(
id
){
...
...
pages/hotel/components/near-good.vue
View file @
06177901
...
...
@@ -18,7 +18,9 @@
}
},
data
()
{
return
{
}
},
created
()
{
...
...
pages/hotel/components/recommed-hotel.vue
View file @
06177901
...
...
@@ -53,7 +53,7 @@
},
data
()
{
return
{
key
:
value
}
},
mounted
(){
...
...
pages/hotel/components/room-good.vue
View file @
06177901
...
...
@@ -3,7 +3,7 @@
<view
class=
"room-good"
v-for=
"(item,index) in RoomList"
>
<view
class=
"rm-left"
>
<template
v-if=
"item.RoomImage&&item.RoomImage.length>0"
>
<image
:src=
"item.RoomImage[0].Path"
mode=
"aspectFill"
>
<image
:src=
"item.RoomImage[0].Path"
mode=
"aspectFill"
@
click=
"previewRoomImage(item.RoomImage[0].Path)"
>
</image>
<view
class=
"mark"
>
{{
item
.
RoomImage
.
length
}}
</view>
</
template
>
...
...
@@ -67,6 +67,19 @@
url
:
"/pages/hotel/order?RoomInfo="
+
JSON
.
stringify
(
item
)
+
'&dayObj='
+
JSON
.
stringify
(
this
.
dayObj
)
+
'&HotelInfo='
+
JSON
.
stringify
(
this
.
hotelData
)
})
},
previewRoomImage
(
img
)
{
uni
.
previewImage
({
urls
:
[
img
],
current
:
1
,
longPressActions
:
{
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
},
},
});
},
},
}
</
script
>
...
...
pages/hotel/detail.vue
View file @
06177901
<
template
>
<view
class=
"hotel-detail"
>
<scroll-view
scroll-y=
"true"
style=
"width: 100%;height: 100%;"
@
scroll=
"scroll"
>
<view
class=
"media"
:style=
"
{'opacity':(100-boxOption)+'%'}">
<u-swiper
:list=
"dataList.HotelImg"
:effect3d=
"false"
:height=
"545"
:interval=
"5000"
:border-radius=
"0"
@
click=
"previewImage"
<view
class=
"media"
:style=
"
{'opacity':(100-boxOption)+'%'}"
@click="openPicture"
>
<u-swiper
:list=
"dataList.HotelImg"
:effect3d=
"false"
:height=
"545"
:interval=
"5000"
:border-radius=
"0"
name=
"Path"
v-if=
"active==1"
></u-swiper>
<view
class=
"video-box"
v-if=
"active==0"
>
<video
id=
"myVideo"
:src=
"detailData.VideoUrl"
style=
"width: 100%;height: 100%;"
:controls=
'controls'
...
...
@@ -22,7 +22,7 @@
<view
class=
"media-info"
>
<view
class=
"flex"
>
<view
class=
"mi-left"
>
<view
v-if=
"dataList.HotelImg.length>0"
class=
"type-img-box"
@
click=
"openPicture"
>
<view
v-if=
"dataList.HotelImg.length>0"
class=
"type-img-box"
>
<image
:src=
"dataList.HotelImg[0].Path"
mode=
"aspectFill"
></image>
<view
class=
"content"
>
<!--
<u-icon
name=
"photo"
size=
"26"
color=
"#FFF"
></u-icon>
-->
...
...
@@ -98,14 +98,17 @@
</view>
</view>
<view
class=
"date-box flex"
@
click=
"showTimePopup=true"
>
<view
class=
"date"
>
<text>
{{
startDay
}}
</text>
<text
class=
"date-week"
>
{{
dayObj
.
startWeek
}}
</text>
</view>
<view
class=
"hr-line"
></view>
<view
class=
"date"
>
<text>
{{
endDay
}}
</text>
<text
class=
"date-week"
>
{{
dayObj
.
endWeek
}}
</text>
<view
class=
"flex"
>
<view
class=
"date"
>
<text>
{{
formatMonthDay
(
startDay
)
}}
</text>
<text
class=
"date-week"
>
{{
dayObj
.
startWeek
}}
</text>
</view>
<view
class=
"hr-line"
></view>
<view
class=
"date"
>
<text>
{{
formatMonthDay
(
endDay
)
}}
</text>
<text
class=
"date-week"
>
{{
dayObj
.
endWeek
}}
</text>
</view>
</view>
<view
class=
"ver-line"
></view>
<view
class=
"date"
>
...
...
@@ -285,7 +288,6 @@
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
},
onLoad
(
options
)
{
console
.
log
(
options
)
this
.
id
=
options
.
id
;
this
.
roomMsg
.
HotelId
=
options
.
id
;
let
that
=
this
...
...
@@ -300,7 +302,7 @@
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
options
.
dayObj
)
{
console
.
log
(
options
.
dayObj
,
'options.dayObj'
);
//
console.log(options.dayObj,'options.dayObj');
var
tempDay
=
JSON
.
parse
(
options
.
dayObj
);
this
.
roomMsg
.
StartDate
=
tempDay
.
start
;
this
.
roomMsg
.
EndDate
=
tempDay
.
end
;
...
...
@@ -348,7 +350,7 @@
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'推荐酒店'
);
//
console.log(res, '推荐酒店');
this
.
HotelArr
=
[];
let
tempHotel
=
res
.
data
.
pageData
;
tempHotel
.
forEach
(
x
=>
{
...
...
@@ -369,10 +371,10 @@
scale
:
18
,
name
,
success
:(
res
)
=>
{
console
.
log
(
res
)
},
fail
:
(
err
)
=>
{
console
.
log
(
err
)
}
})
},
...
...
@@ -406,7 +408,6 @@
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'房间数据'
);
this
.
RoomList
=
res
.
data
.
RoomList
;
}
}
...
...
@@ -499,7 +500,7 @@
itemList
:
[
"发送给朋友"
,
"保存图片"
,
"收藏"
],
success
:
function
(
data
)
{},
fail
:
function
(
err
)
{
console
.
log
(
err
.
errMsg
);
//
console.log(err.errMsg);
},
},
});
...
...
@@ -546,7 +547,7 @@
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'详情数据'
);
//
console.log(res, '详情数据');
this
.
dataList
=
res
.
data
;
this
.
RoomList
=
this
.
dataList
.
RoomList
;
this
.
hotelData
.
HotelId
=
this
.
dataList
.
HotelId
;
...
...
@@ -641,6 +642,7 @@
background
:
#ECF1F4
;
border-radius
:
16
rpx
;
padding
:
25
rpx
;
justify-content
:
space-between
;
}
.hotel-detail
.hotel-content
.date-box
.hr-line
{
...
...
pages/hotel/list.vue
View file @
06177901
...
...
@@ -2,7 +2,7 @@
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"hotel-city"
@
click=
"showCity"
>
<u-icon
name=
"location"
:size=
"24"
color=
"#
EE4454
"
></u-icon>
<u-icon
name=
"location"
:size=
"24"
color=
"#
000000"
style=
"margin-right: 8rpx;
"
></u-icon>
{{
city
}}
</view>
...
...
@@ -476,7 +476,6 @@
this
.
cityList
.
push
(
obj
)
}
})
console
.
log
(
this
.
cityList
)
}
},
err
=>
{
...
...
pages/restaurant/components/address/smh-address-indexed.vue
View file @
06177901
...
...
@@ -153,7 +153,7 @@
}
.scroll-view2
{
width
:
40rpx
;
height
:
90vh
;
height
:
100%
;
padding-bottom
:
30rpx
;
.right
{
width
:
100%
;
...
...
pages/restaurant/components/recommed-hotel.vue
View file @
06177901
...
...
@@ -55,14 +55,9 @@
},
data
()
{
return
{
key
:
value
}
},
mounted
(){
},
created
(){
console
.
log
(
64
,
this
.
foodArr
)
},
methods
:{
goHotelDetail
(
id
){
// let myDayObj = JSON.stringify(this.dayObj);
...
...
pages/restaurant/components/restaurant-type.vue
View file @
06177901
...
...
@@ -137,7 +137,7 @@
components
:
{
sidebar
,
},
crea
ted
()
{
moun
ted
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
sd
=
this
.
d
[
this
.
tid
].
ChildrenList
;
},
...
...
@@ -150,22 +150,6 @@
clickHandler
(
item
)
{
this
.
currentObj
=
item
this
.
currentObj
.
active
=
this
.
active
// let Id1 = this.d[this.tid].ID;
// let Id2 = item.ID;
// let CategoryIds = Id2;
// let IsEducation = uni.getStorageSync('basedata') ?
// (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
// .IsEducation : 0) :
// 0;
// if (IsEducation == 1) {
// uni.navigateTo({
// url: '/pages/school/courseList?CategoryIds=' + CategoryIds
// });
// } else {
// uni.navigateTo({
// url: '/pages/goods/list?CategoryIds=' + CategoryIds
// });
// }
},
sendResult
(
t
){
if
(
t
==-
1
){
...
...
pages/restaurant/detail.vue
View file @
06177901
...
...
@@ -107,7 +107,7 @@
<!--
<package-good-test></package-good-test>
-->
</view>
</view>
<view
class=
"empty-block"
style=
"margin-bottom:
2
0rpx;"
></view>
<view
class=
"empty-block"
style=
"margin-bottom:
4
0rpx;"
></view>
<view
class=
""
>
<view
class=
"flex"
>
<view
class=
"big-title"
>
...
...
@@ -481,6 +481,7 @@
<
style
lang=
"scss"
scoped
>
.no-data
{
margin
:
40rpx
0
;
.no-data-img
{
width
:
180rpx
;
height
:
240rpx
;
...
...
@@ -814,7 +815,7 @@
}
.restaurant-detail
.restaurant-content
.restaurant-base
.head
.op-box
{
margin-top
:
-1
75
rpx
;
margin-top
:
-1
60
rpx
;
}
.restaurant-detail
.restaurant-content
.restaurant-base
.head
.op-box
image
{
...
...
pages/restaurant/list.vue
View file @
06177901
...
...
@@ -2,7 +2,7 @@
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"city-box"
@
click=
"showCity"
>
<u-icon
name=
"location"
:size=
"28"
color=
"#
EE4454
"
></u-icon>
<u-icon
name=
"location"
:size=
"28"
color=
"#
000000"
style=
"margin-right: 8rpx;
"
></u-icon>
{{
city
}}
</view>
<view
style=
"width: 1px; flex: 1;"
>
...
...
@@ -521,13 +521,10 @@
<
style
scoped
>
.city-box
{
width
:
1
05
rpx
;
width
:
1
20
rpx
;
height
:
40
rpx
;
/* line-height: 30rpx; */
padding
:
0
rpx
10
rpx
8
rpx
0
rpx
;
margin-right
:
20
rpx
;
padding
:
0
rpx
20
rpx
8
rpx
0
rpx
;
text-align
:
center
;
/* color: #DFBE6E; */
border-right
:
1px
solid
#E2E2E2
;
font-size
:
28
rpx
;
white-space
:
nowrap
;
...
...
@@ -540,7 +537,6 @@
justify-content
:
center
;
}
.hotel-rate-box
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
pages/restaurant/picture.vue
View file @
06177901
...
...
@@ -6,27 +6,45 @@
</view>
</view>
<view
class=
"img-list-box"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
:style=
"
{'margin-right':index%2 ==0?'20rpx':0}">
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"aspectFill"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit =
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
<view
class=
"left"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
v-if=
"index%2==0"
>
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"widthFix"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
</view>
</view>
</view>
</view>
<view
class=
"right"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
v-if=
"index%2==1"
>
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"widthFix"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
...
...
@@ -183,22 +201,29 @@
padding
:
0
45rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
.left
{
width
:
315rpx
;
}
.right
{
width
:
315rpx
;
}
.img-list-item
{
width
:
315rpx
;
margin-bottom
:
20rpx
;
.img-box
{
width
:
315rpx
;
height
:
315rpx
;
background-color
:
#E7E7E7
;
border-radius
:
20rpx
;
overflow
:
hidden
;
margin-bottom
:
20rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
#myVideo
{
width
:
100%
;
height
:
100%
;
width
:
315rpx
;
height
:
315rpx
;
}
}
}
...
...
pages/ticketCoupons/components/address/smh-address-indexed.vue
View file @
06177901
...
...
@@ -153,7 +153,7 @@
}
.scroll-view2
{
width
:
40rpx
;
height
:
90vh
;
height
:
100%
;
padding-bottom
:
30rpx
;
.right
{
width
:
100%
;
...
...
pages/ticketCoupons/components/recommed-hotel.vue
View file @
06177901
...
...
@@ -55,7 +55,6 @@
},
data
()
{
return
{
key
:
value
}
},
mounted
(){
...
...
pages/ticketCoupons/detail.vue
View file @
06177901
...
...
@@ -5,7 +5,7 @@
:style=
"
{'opacity':(100-boxOption)+'%'}">
<view
@
click=
"goback"
:style=
"[titleStyle,
{opacity:'100% !important'}]"
style="position: fixed;top: 0;left: 0;z-index: 9; padding-left: 6rpx;">
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#
000
"
style=
"margin-top: 22rpx;"
></u-icon>
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#
ffffff
"
style=
"margin-top: 22rpx;"
></u-icon>
</view>
<image
class=
"banner-img"
:src=
"details.AllPicList[0].TagPicList[0].Path"
mode=
"aspectFill"
@
click=
"goUrl('/pages/ticketCoupons/imgList')"
></image>
...
...
@@ -79,6 +79,7 @@
</view>
<view
class=
"see-map"
@
click=
"goMap(details.Address,details.Lng,details.Lat)"
>
地图详情
<u-icon
name=
"arrow"
color=
"#6E6E6E"
size=
"24rpx"
class=
"icon"
></u-icon>
</view>
</view>
</view>
...
...
@@ -918,6 +919,11 @@
font-weight
:
500
;
color
:
#111111
;
line-height
:
44rpx
;
display
:
flex
;
align-items
:
center
;
.icon
{
margin-left
:
10rpx
;
}
}
}
}
...
...
pages/ticketCoupons/imgList.vue
View file @
06177901
<
template
>
<view
class=
"img-list"
>
<view
class=
"img-navs"
>
<view
v-for=
"(item,index) in navList"
:key=
"index"
class=
"nav-btn"
:class=
"
{'check-nav':index===curNavIndex,'last-nav':index===navList.length-1}" @click="changeNav(index)">
<view
v-for=
"(item,index) in navList"
:key=
"index"
class=
"nav-btn"
:class=
"
{'check-nav':index===curNavIndex,'last-nav':index===navList.length-1}"
@click="changeNav(index)">
{{
item
.
TagName
||
'其他'
}}
</view>
</view>
<view
class=
"img-list-box"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
:style=
"
{'margin-right':index%2 ==0?'20rpx':0}">
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"aspectFill"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit =
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
<view
class=
"img-list-box"
>
<view
class=
"left"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
v-if=
"index%2==0"
>
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"widthFix"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
</view>
</view>
</view>
</view>
<view
class=
"right"
>
<view
v-for=
"(item,index) in dataList.TagPicList"
:key=
"item.ID"
class=
"img-list-item"
v-if=
"index%2==1"
>
<view
class=
"img-box"
@
click=
"previewImage(index,item.Path)"
v-if=
"item.type==='image'"
>
<image
:src=
"item.Path"
mode=
"widthFix"
></image>
</view>
<view
class=
"img-box"
style=
"position: relative"
v-if=
"item.type==='video'"
>
<video
id=
"myVideo"
:src=
"item.Path"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<!-- 播放按钮 -->
<view
@
click=
"enlarge"
style=
"position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
ID
:
0
,
navList
:[],
curNavIndex
:
0
,
dataList
:
[],
controls
:
false
,
//显示默认控件
videoContext
:
""
,
preImgList
:[]
ID
:
0
,
navList
:
[],
curNavIndex
:
0
,
dataList
:
[],
controls
:
false
,
//显示默认控件
videoContext
:
""
,
preImgList
:
[]
}
},
watch
:{
curNavIndex
(
val
){
watch
:
{
curNavIndex
(
val
)
{
}
},
created
()
{
uni
.
setNavigationBarTitle
({
title
:
"风景图片"
,
});
},
onLoad
(
options
)
{
if
(
options
&&
options
.
id
)
{
...
...
@@ -64,7 +83,7 @@
},
methods
:
{
//获取详情
getDetail
(
index
=
0
)
{
getDetail
(
index
=
0
)
{
this
.
request2
({
url
:
'/api/AppletDining/GetTicketCouponsDetails'
,
data
:
{
...
...
@@ -74,45 +93,47 @@
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
navList
=
res
.
data
.
AllPicList
;
this
.
dataList
=
res
.
data
.
AllPicList
[
index
]
this
.
preImgList
=
[]
this
.
dataList
.
TagPicList
.
map
(
i
=>
{
if
(
i
.
Path
)
{
this
.
dataList
=
res
.
data
.
AllPicList
[
index
]
this
.
preImgList
=
[]
this
.
dataList
.
TagPicList
.
map
(
i
=>
{
if
(
i
.
Path
)
{
this
.
preImgList
.
push
(
i
.
Path
)
}
})
this
.
dataList
.
TagPicList
.
forEach
(
item
=>
{
if
(
item
.
Path
.
indexOf
(
'jpg'
)
!==-
1
||
item
.
Path
.
indexOf
(
'png'
)
!==-
1
||
item
.
Path
.
indexOf
(
'jpeg'
)
!==-
1
){
item
.
type
=
'image'
}
else
if
(
item
.
Path
.
indexOf
(
'mp4'
)
!==-
1
){
item
.
type
=
'video'
this
.
dataList
.
TagPicList
.
forEach
(
item
=>
{
if
(
item
.
Path
.
indexOf
(
'jpg'
)
!==
-
1
||
item
.
Path
.
indexOf
(
'png'
)
!==
-
1
||
item
.
Path
.
indexOf
(
'jpeg'
)
!==
-
1
)
{
item
.
type
=
'image'
}
else
if
(
item
.
Path
.
indexOf
(
'mp4'
)
!==
-
1
)
{
item
.
type
=
'video'
}
})
}
}
);
},
changeNav
(
index
){
this
.
curNavIndex
=
index
this
.
dataList
=
this
.
navList
[
index
]
this
.
preImgList
=
[]
this
.
dataList
.
TagPicList
.
map
(
i
=>
{
if
(
i
.
Path
)
{
},
changeNav
(
index
)
{
this
.
curNavIndex
=
index
this
.
dataList
=
this
.
navList
[
index
]
this
.
preImgList
=
[]
this
.
dataList
.
TagPicList
.
map
(
i
=>
{
if
(
i
.
Path
)
{
this
.
preImgList
.
push
(
i
.
Path
)
}
})
this
.
dataList
.
TagPicList
.
forEach
(
item
=>
{
if
(
item
.
Path
.
indexOf
(
'jpg'
)
!==-
1
||
item
.
Path
.
indexOf
(
'png'
)
!==-
1
||
item
.
Path
.
indexOf
(
'jpeg'
)
!==-
1
){
item
.
type
=
'image'
}
else
if
(
item
.
Path
.
indexOf
(
'mp4'
)
!==-
1
){
item
.
type
=
'video'
this
.
dataList
.
TagPicList
.
forEach
(
item
=>
{
if
(
item
.
Path
.
indexOf
(
'jpg'
)
!==
-
1
||
item
.
Path
.
indexOf
(
'png'
)
!==
-
1
||
item
.
Path
.
indexOf
(
'jpeg'
)
!==
-
1
)
{
item
.
type
=
'image'
}
else
if
(
item
.
Path
.
indexOf
(
'mp4'
)
!==
-
1
)
{
item
.
type
=
'video'
}
})
},
//预览图片
previewImage
(
i
,
url
)
{
previewImage
(
i
,
url
)
{
uni
.
previewImage
({
urls
:
this
.
preImgList
,
current
:
i
,
...
...
@@ -131,33 +152,33 @@
// 全屏
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
);
this
.
videoContext
.
requestFullScreen
({
direction
:
0
direction
:
0
})
},
videoControl
(
e
){
// if(e.detail.fullScreen===false){
// this.videoContext.stop()
// this.controls=false
// }else{
// this.videoContext.play()
// this.controls=true
// }
console
.
log
(
e
.
detail
)
videoControl
(
e
)
{
if
(
e
.
detail
.
fullScreen
===
false
){
this
.
videoContext
.
stop
()
this
.
controls
=
false
}
else
{
this
.
videoContext
.
play
()
this
.
controls
=
true
}
},
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.img-list
{
.img-navs
{
.img-list
{
.img-navs
{
display
:
flex
;
margin
:
0
45rpx
;
padding
:
20rpx
0
;
overflow-x
:
scroll
;
overflow-y
:
hidden
;
.nav-btn
{
.nav-btn
{
// width: 230rpx;
height
:
60rpx
;
background-color
:
#FFFFFF
;
...
...
@@ -171,34 +192,47 @@
margin-right
:
30rpx
;
white-space
:
nowrap
;
}
.check-nav
{
.check-nav
{
background-color
:
#111111
;
color
:
#FFFFFF
;
}
.last-nav
{
.last-nav
{
margin-right
:
0
!
important
;
}
}
.img-list-box
{
.img-list-box
{
padding
:
0
45rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
.img-list-item
{
justify-content
:
space-between
;
.left
{
width
:
315rpx
;
}
.right
{
width
:
315rpx
;
margin-bottom
:
20rpx
;
.img-box
{
}
.img-list-item
{
width
:
315rpx
;
.img-box
{
width
:
315rpx
;
height
:
315rpx
;
background-color
:
#E7E7E7
;
box-shadow
:
0rpx
10rpx
30rpx
0rpx
rgba
(
36
,
36
,
36
,
0
.2
);
border-radius
:
20rpx
;
overflow
:
hidden
;
image
{
margin-bottom
:
20rpx
;
image
{
width
:
100%
;
height
:
100%
;
}
#myVideo
{
width
:
100%
;
height
:
100%
;
#myVideo
{
width
:
315rpx
;
height
:
315rpx
;
}
}
}
...
...
pages/ticketCoupons/list.vue
View file @
06177901
...
...
@@ -2,7 +2,7 @@
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"city-box"
@
click=
"showCity"
>
<u-icon
name=
"location"
:size=
"28"
color=
"#
EE4454
"
></u-icon>
<u-icon
name=
"location"
:size=
"28"
color=
"#
000000"
style=
"margin-right: 8rpx;
"
></u-icon>
{{
city
}}
</view>
<view
style=
"width: 1px; flex: 1;"
>
...
...
@@ -405,13 +405,10 @@
<
style
lang=
"scss"
scoped
>
.city-box
{
width
:
1
05
rpx
;
width
:
1
20
rpx
;
height
:
40rpx
;
/* line-height: 30rpx; */
padding
:
0rpx
10rpx
8rpx
0rpx
;
margin-right
:
20rpx
;
padding
:
0rpx
20rpx
8rpx
0rpx
;
text-align
:
center
;
/* color: #DFBE6E; */
border-right
:
1px
solid
#E2E2E2
;
font-size
:
28rpx
;
white-space
:
nowrap
;
...
...
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