Commit 06177901 authored by 罗超's avatar 罗超

1

parent d71d60e9
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
} }
.scroll-view2{ .scroll-view2{
width: 40rpx; width: 40rpx;
height: 90vh; height: 100%;
padding-bottom: 30rpx; padding-bottom: 30rpx;
.right{ .right{
width: 100%; width: 100%;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 --> <!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view class="rate" v-if="item.Star>=1&&item.Star<=5"> <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> <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>
<view class="other-rate" v-if="item.Star==9"> <view class="other-rate" v-if="item.Star==9">
<text>温泉酒店</text> <text>温泉酒店</text>
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
}, },
data() { data() {
return { return {
key: value
} }
}, },
created() { created() {
console.log(this.HotelList, 'hotel'); // console.log(this.HotelList, 'hotel');
}, },
methods:{ methods:{
goHotelDetail(id){ goHotelDetail(id){
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
} }
}, },
data() { data() {
return{
}
}, },
created() { created() {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
}, },
data() { data() {
return { return {
key: value
} }
}, },
mounted(){ mounted(){
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="room-good" v-for="(item,index) in RoomList"> <view class="room-good" v-for="(item,index) in RoomList">
<view class="rm-left"> <view class="rm-left">
<template v-if="item.RoomImage&&item.RoomImage.length>0"> <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> </image>
<view class="mark">{{item.RoomImage.length}}</view> <view class="mark">{{item.RoomImage.length}}</view>
</template> </template>
...@@ -67,6 +67,19 @@ ...@@ -67,6 +67,19 @@
url: "/pages/hotel/order?RoomInfo="+ JSON.stringify(item) + '&dayObj=' + JSON.stringify(this.dayObj) + '&HotelInfo=' + JSON.stringify(this.hotelData) 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> </script>
......
<template> <template>
<view class="hotel-detail"> <view class="hotel-detail">
<scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll"> <scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll">
<view class="media" :style="{'opacity':(100-boxOption)+'%'}"> <view class="media" :style="{'opacity':(100-boxOption)+'%'}" @click="openPicture">
<u-swiper :list="dataList.HotelImg" :effect3d="false" :height="545" :interval="5000" :border-radius="0" @click="previewImage" <u-swiper :list="dataList.HotelImg" :effect3d="false" :height="545" :interval="5000" :border-radius="0"
name="Path" v-if="active==1"></u-swiper> name="Path" v-if="active==1"></u-swiper>
<view class="video-box" v-if="active==0"> <view class="video-box" v-if="active==0">
<video id="myVideo" :src="detailData.VideoUrl" style="width: 100%;height: 100%;" :controls='controls' <video id="myVideo" :src="detailData.VideoUrl" style="width: 100%;height: 100%;" :controls='controls'
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="media-info"> <view class="media-info">
<view class="flex"> <view class="flex">
<view class="mi-left"> <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> <image :src="dataList.HotelImg[0].Path" mode="aspectFill"></image>
<view class="content"> <view class="content">
<!-- <u-icon name="photo" size="26" color="#FFF"></u-icon> --> <!-- <u-icon name="photo" size="26" color="#FFF"></u-icon> -->
...@@ -98,15 +98,18 @@ ...@@ -98,15 +98,18 @@
</view> </view>
</view> </view>
<view class="date-box flex" @click="showTimePopup=true"> <view class="date-box flex" @click="showTimePopup=true">
<view class="flex">
<view class="date"> <view class="date">
<text>{{startDay}}</text> <text>{{formatMonthDay(startDay)}}</text>
<text class="date-week">{{dayObj.startWeek}}</text> <text class="date-week">{{dayObj.startWeek}}</text>
</view> </view>
<view class="hr-line"></view> <view class="hr-line"></view>
<view class="date"> <view class="date">
<text>{{endDay}}</text> <text>{{formatMonthDay(endDay)}}</text>
<text class="date-week">{{dayObj.endWeek}}</text> <text class="date-week">{{dayObj.endWeek}}</text>
</view> </view>
</view>
<view class="ver-line"></view> <view class="ver-line"></view>
<view class="date"> <view class="date">
共 · {{day}} 共 · {{day}}
...@@ -285,7 +288,6 @@ ...@@ -285,7 +288,6 @@
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0; this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.id = options.id; this.id = options.id;
this.roomMsg.HotelId = options.id; this.roomMsg.HotelId = options.id;
let that = this let that = this
...@@ -300,7 +302,7 @@ ...@@ -300,7 +302,7 @@
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
if (options.dayObj) { if (options.dayObj) {
console.log(options.dayObj,'options.dayObj'); // console.log(options.dayObj,'options.dayObj');
var tempDay = JSON.parse(options.dayObj); var tempDay = JSON.parse(options.dayObj);
this.roomMsg.StartDate = tempDay.start; this.roomMsg.StartDate = tempDay.start;
this.roomMsg.EndDate = tempDay.end; this.roomMsg.EndDate = tempDay.end;
...@@ -348,7 +350,7 @@ ...@@ -348,7 +350,7 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res, '推荐酒店'); // console.log(res, '推荐酒店');
this.HotelArr = []; this.HotelArr = [];
let tempHotel = res.data.pageData; let tempHotel = res.data.pageData;
tempHotel.forEach(x => { tempHotel.forEach(x => {
...@@ -369,10 +371,10 @@ ...@@ -369,10 +371,10 @@
scale: 18, scale: 18,
name, name,
success:(res)=>{ success:(res)=>{
console.log(res)
}, },
fail: (err) => { fail: (err) => {
console.log(err)
} }
}) })
}, },
...@@ -406,7 +408,6 @@ ...@@ -406,7 +408,6 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res, '房间数据');
this.RoomList = res.data.RoomList; this.RoomList = res.data.RoomList;
} }
} }
...@@ -499,7 +500,7 @@ ...@@ -499,7 +500,7 @@
itemList: ["发送给朋友", "保存图片", "收藏"], itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {}, success: function(data) {},
fail: function(err) { fail: function(err) {
console.log(err.errMsg); // console.log(err.errMsg);
}, },
}, },
}); });
...@@ -546,7 +547,7 @@ ...@@ -546,7 +547,7 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res, '详情数据'); // console.log(res, '详情数据');
this.dataList = res.data; this.dataList = res.data;
this.RoomList = this.dataList.RoomList; this.RoomList = this.dataList.RoomList;
this.hotelData.HotelId = this.dataList.HotelId; this.hotelData.HotelId = this.dataList.HotelId;
...@@ -641,6 +642,7 @@ ...@@ -641,6 +642,7 @@
background: #ECF1F4; background: #ECF1F4;
border-radius: 16rpx; border-radius: 16rpx;
padding: 25rpx; padding: 25rpx;
justify-content: space-between;
} }
.hotel-detail .hotel-content .date-box .hr-line { .hotel-detail .hotel-content .date-box .hr-line {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view class="hotel-city" @click="showCity"> <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}} {{city}}
</view> </view>
...@@ -476,7 +476,6 @@ ...@@ -476,7 +476,6 @@
this.cityList.push(obj) this.cityList.push(obj)
} }
}) })
console.log(this.cityList)
} }
}, },
err => { err => {
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
} }
.scroll-view2{ .scroll-view2{
width: 40rpx; width: 40rpx;
height: 90vh; height: 100%;
padding-bottom: 30rpx; padding-bottom: 30rpx;
.right{ .right{
width: 100%; width: 100%;
......
...@@ -55,14 +55,9 @@ ...@@ -55,14 +55,9 @@
}, },
data() { data() {
return { return {
key: value
} }
}, },
mounted(){
},
created(){
console.log(64,this.foodArr)
},
methods:{ methods:{
goHotelDetail(id){ goHotelDetail(id){
// let myDayObj = JSON.stringify(this.dayObj); // let myDayObj = JSON.stringify(this.dayObj);
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
components: { components: {
sidebar, sidebar,
}, },
created() { mounted() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].ChildrenList; this.sd = this.d[this.tid].ChildrenList;
}, },
...@@ -150,22 +150,6 @@ ...@@ -150,22 +150,6 @@
clickHandler(item) { clickHandler(item) {
this.currentObj=item this.currentObj=item
this.currentObj.active=this.active 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){ sendResult(t){
if(t==-1){ if(t==-1){
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<!-- <package-good-test></package-good-test> --> <!-- <package-good-test></package-good-test> -->
</view> </view>
</view> </view>
<view class="empty-block" style="margin-bottom: 20rpx;"></view> <view class="empty-block" style="margin-bottom: 40rpx;"></view>
<view class=""> <view class="">
<view class="flex"> <view class="flex">
<view class="big-title"> <view class="big-title">
...@@ -481,6 +481,7 @@ ...@@ -481,6 +481,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.no-data { .no-data {
margin: 40rpx 0;
.no-data-img { .no-data-img {
width: 180rpx; width: 180rpx;
height: 240rpx; height: 240rpx;
...@@ -814,7 +815,7 @@ ...@@ -814,7 +815,7 @@
} }
.restaurant-detail .restaurant-content .restaurant-base .head .op-box { .restaurant-detail .restaurant-content .restaurant-base .head .op-box {
margin-top: -175rpx; margin-top: -160rpx;
} }
.restaurant-detail .restaurant-content .restaurant-base .head .op-box image { .restaurant-detail .restaurant-content .restaurant-base .head .op-box image {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view class="city-box" @click="showCity"> <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}} {{city}}
</view> </view>
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
...@@ -521,13 +521,10 @@ ...@@ -521,13 +521,10 @@
<style scoped> <style scoped>
.city-box { .city-box {
width: 105rpx; width: 120rpx;
height: 40rpx; height: 40rpx;
/* line-height: 30rpx; */ padding: 0rpx 20rpx 8rpx 0rpx;
padding: 0rpx 10rpx 8rpx 0rpx;
margin-right: 20rpx;
text-align: center; text-align: center;
/* color: #DFBE6E; */
border-right: 1px solid #E2E2E2; border-right: 1px solid #E2E2E2;
font-size: 28rpx; font-size: 28rpx;
white-space: nowrap; white-space: nowrap;
...@@ -540,7 +537,6 @@ ...@@ -540,7 +537,6 @@
justify-content: center; justify-content: center;
} }
.hotel-rate-box { .hotel-rate-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -6,18 +6,15 @@ ...@@ -6,18 +6,15 @@
</view> </view>
</view> </view>
<view class="img-list-box"> <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="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'"> <view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<image :src="item.Path" mode="aspectFill" ></image> <image :src="item.Path" mode="widthFix"></image>
</view> </view>
<view class="img-box" style="position: relative" v-if="item.type==='video'"> <view class="img-box" style="position: relative" v-if="item.type==='video'">
<video id="myVideo" :src="item.Path" <video id="myVideo" :src="item.Path" :controls='controls' :show-center-play-btn='false'
:controls='controls' :show-fullscreen-btn='false' @fullscreenchange='videoControl' object-fit='fill'></video>
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
object-fit ='fill'
></video>
<!-- 播放按钮 --> <!-- 播放按钮 -->
<view @click="enlarge" <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;"> 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;">
...@@ -28,6 +25,27 @@ ...@@ -28,6 +25,27 @@
</view> </view>
</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> </template>
...@@ -183,22 +201,29 @@ ...@@ -183,22 +201,29 @@
padding: 0 45rpx; padding: 0 45rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.left {
width: 315rpx;
}
.right {
width: 315rpx;
}
.img-list-item{ .img-list-item{
width: 315rpx; width: 315rpx;
margin-bottom: 20rpx;
.img-box{ .img-box{
width: 315rpx; width: 315rpx;
height: 315rpx;
background-color: #E7E7E7; background-color: #E7E7E7;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx;
image{ image{
width: 100%; width: 100%;
height: 100%;
} }
#myVideo{ #myVideo{
width: 100%; width: 315rpx;
height: 100%; height: 315rpx;
} }
} }
} }
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
} }
.scroll-view2{ .scroll-view2{
width: 40rpx; width: 40rpx;
height: 90vh; height: 100%;
padding-bottom: 30rpx; padding-bottom: 30rpx;
.right{ .right{
width: 100%; width: 100%;
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
}, },
data() { data() {
return { return {
key: value
} }
}, },
mounted(){ mounted(){
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:style="{'opacity':(100-boxOption)+'%'}"> :style="{'opacity':(100-boxOption)+'%'}">
<view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]" <view @click="goback" :style="[titleStyle,{opacity:'100% !important'}]"
style="position: fixed;top: 0;left: 0;z-index: 9; padding-left: 6rpx;"> 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> </view>
<image class="banner-img" :src="details.AllPicList[0].TagPicList[0].Path" mode="aspectFill" <image class="banner-img" :src="details.AllPicList[0].TagPicList[0].Path" mode="aspectFill"
@click="goUrl('/pages/ticketCoupons/imgList')"></image> @click="goUrl('/pages/ticketCoupons/imgList')"></image>
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
</view> </view>
<view class="see-map" @click="goMap(details.Address,details.Lng,details.Lat)"> <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> </view>
</view> </view>
...@@ -918,6 +919,11 @@ ...@@ -918,6 +919,11 @@
font-weight: 500; font-weight: 500;
color: #111111; color: #111111;
line-height: 44rpx; line-height: 44rpx;
display: flex;
align-items: center;
.icon {
margin-left: 10rpx;
}
} }
} }
} }
......
<template> <template>
<view class="img-list"> <view class="img-list">
<view class="img-navs"> <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||'其他'}} {{item.TagName||'其他'}}
</view> </view>
</view> </view>
<view class="img-list-box"> <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="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'"> <view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<image :src="item.Path" mode="aspectFill" ></image> <image :src="item.Path" mode="widthFix"></image>
</view> </view>
<view class="img-box" style="position: relative" v-if="item.type==='video'"> <view class="img-box" style="position: relative" v-if="item.type==='video'">
<video id="myVideo" :src="item.Path" <video id="myVideo" :src="item.Path" :controls='controls' :show-center-play-btn='false'
:controls='controls' :show-fullscreen-btn='false' @fullscreenchange='videoControl' object-fit='fill'></video>
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
object-fit ='fill'
></video>
<!-- 播放按钮 --> <!-- 播放按钮 -->
<view @click="enlarge" <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;"> 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;">
...@@ -28,25 +27,45 @@ ...@@ -28,25 +27,45 @@
</view> </view>
</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> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
ID:0, ID: 0,
navList:[], navList: [],
curNavIndex:0, curNavIndex: 0,
dataList:[], dataList: [],
controls:false,//显示默认控件 controls: false, //显示默认控件
videoContext:"", videoContext: "",
preImgList:[] preImgList: []
} }
}, },
watch:{ watch: {
curNavIndex(val){ curNavIndex(val) {
} }
}, },
...@@ -64,7 +83,7 @@ ...@@ -64,7 +83,7 @@
}, },
methods: { methods: {
//获取详情 //获取详情
getDetail(index=0) { getDetail(index = 0) {
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
data: { data: {
...@@ -74,18 +93,19 @@ ...@@ -74,18 +93,19 @@
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.navList = res.data.AllPicList; this.navList = res.data.AllPicList;
this.dataList=res.data.AllPicList[index] this.dataList = res.data.AllPicList[index]
this.preImgList=[] this.preImgList = []
this.dataList.TagPicList.map(i=>{ this.dataList.TagPicList.map(i => {
if(i.Path){ if (i.Path) {
this.preImgList.push(i.Path) this.preImgList.push(i.Path)
} }
}) })
this.dataList.TagPicList.forEach(item=>{ this.dataList.TagPicList.forEach(item => {
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){ if (item.Path.indexOf('jpg') !== -1 || item.Path.indexOf('png') !== -1 || item
item.type='image' .Path.indexOf('jpeg') !== -1) {
}else if(item.Path.indexOf('mp4')!==-1){ item.type = 'image'
item.type='video' } else if (item.Path.indexOf('mp4') !== -1) {
item.type = 'video'
} }
}) })
...@@ -93,26 +113,27 @@ ...@@ -93,26 +113,27 @@
} }
); );
}, },
changeNav(index){ changeNav(index) {
this.curNavIndex=index this.curNavIndex = index
this.dataList=this.navList[index] this.dataList = this.navList[index]
this.preImgList=[] this.preImgList = []
this.dataList.TagPicList.map(i=>{ this.dataList.TagPicList.map(i => {
if(i.Path){ if (i.Path) {
this.preImgList.push(i.Path) this.preImgList.push(i.Path)
} }
}) })
this.dataList.TagPicList.forEach(item=>{ this.dataList.TagPicList.forEach(item => {
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){ if (item.Path.indexOf('jpg') !== -1 || item.Path.indexOf('png') !== -1 || item.Path.indexOf(
item.type='image' 'jpeg') !== -1) {
}else if(item.Path.indexOf('mp4')!==-1){ item.type = 'image'
item.type='video' } else if (item.Path.indexOf('mp4') !== -1) {
item.type = 'video'
} }
}) })
}, },
//预览图片 //预览图片
previewImage(i,url) { previewImage(i, url) {
uni.previewImage({ uni.previewImage({
urls: this.preImgList, urls: this.preImgList,
current: i, current: i,
...@@ -131,33 +152,33 @@ ...@@ -131,33 +152,33 @@
// 全屏 // 全屏
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({ this.videoContext.requestFullScreen({
direction:0 direction: 0
}) })
}, },
videoControl(e){ videoControl(e) {
// if(e.detail.fullScreen===false){ if(e.detail.fullScreen===false){
// this.videoContext.stop() this.videoContext.stop()
// this.controls=false this.controls=false
// }else{ }else{
// this.videoContext.play() this.videoContext.play()
// this.controls=true this.controls=true
// } }
console.log(e.detail)
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.img-list{ .img-list {
.img-navs{ .img-navs {
display: flex; display: flex;
margin: 0 45rpx; margin: 0 45rpx;
padding: 20rpx 0; padding: 20rpx 0;
overflow-x: scroll; overflow-x: scroll;
overflow-y: hidden; overflow-y: hidden;
.nav-btn{
.nav-btn {
// width: 230rpx; // width: 230rpx;
height: 60rpx; height: 60rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -171,34 +192,47 @@ ...@@ -171,34 +192,47 @@
margin-right: 30rpx; margin-right: 30rpx;
white-space: nowrap; white-space: nowrap;
} }
.check-nav{
.check-nav {
background-color: #111111; background-color: #111111;
color: #FFFFFF; color: #FFFFFF;
} }
.last-nav{
.last-nav {
margin-right: 0 !important; margin-right: 0 !important;
} }
} }
.img-list-box{
.img-list-box {
padding: 0 45rpx; padding: 0 45rpx;
display: flex; display: flex;
flex-wrap: wrap; justify-content: space-between;
.img-list-item{
.left {
width: 315rpx; width: 315rpx;
margin-bottom: 20rpx; }
.img-box{
.right {
width: 315rpx; width: 315rpx;
height: 315rpx; }
background-color: #E7E7E7;
.img-list-item {
width: 315rpx;
.img-box {
width: 315rpx;
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
image{ margin-bottom: 20rpx;
image {
width: 100%; width: 100%;
height: 100%;
} }
#myVideo{
width: 100%; #myVideo {
height: 100%; width: 315rpx;
height: 315rpx;
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view class="city-box" @click="showCity"> <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}} {{city}}
</view> </view>
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
...@@ -405,13 +405,10 @@ ...@@ -405,13 +405,10 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.city-box { .city-box {
width: 105rpx; width: 120rpx;
height: 40rpx; height: 40rpx;
/* line-height: 30rpx; */ padding: 0rpx 20rpx 8rpx 0rpx;
padding: 0rpx 10rpx 8rpx 0rpx;
margin-right: 20rpx;
text-align: center; text-align: center;
/* color: #DFBE6E; */
border-right: 1px solid #E2E2E2; border-right: 1px solid #E2E2E2;
font-size: 28rpx; font-size: 28rpx;
white-space: nowrap; white-space: nowrap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment