Commit 82e02052 authored by 罗超's avatar 罗超

1

parent 3b03bc16
...@@ -750,6 +750,13 @@ ...@@ -750,6 +750,13 @@
} }
},{ },{
"path": "imgList" "path": "imgList"
},
{
"path": "buyNotice",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
} }
] ]
} }
......
...@@ -220,7 +220,6 @@ ...@@ -220,7 +220,6 @@
this.active = i; this.active = i;
}, },
previewImage(i) { previewImage(i) {
console.log(i)
uni.previewImage({ uni.previewImage({
urls: this.detailData.BannerList, urls: this.detailData.BannerList,
current: i, current: i,
......
...@@ -24,15 +24,6 @@ ...@@ -24,15 +24,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <u-collapse >
<u-collapse-item :title="item.Name" v-for="(item) in dataList" >
<u-collapse v-if="item.ChildrenList">
<u-collapse-item :title="_item.Name" v-for="(_item) in item.ChildrenList" >
</u-collapse-item>
</u-collapse>
</u-collapse-item>
</u-collapse> -->
</view> </view>
</template> </template>
......
...@@ -2,34 +2,7 @@ ...@@ -2,34 +2,7 @@
<view class="content"> <view class="content">
<scroll-view :scroll-y="true" style="height: 100%;"> <scroll-view :scroll-y="true" style="height: 100%;">
<view class="header"> <view class="header">
<!-- <view class="bar"></view>
<view class="set text-gray">
<text @click="close" style="font-size:40upx;">返回</text>
<text @click="reset" style="font-size:35upx;color:#DDDDDD">清空</text>
</view> -->
<!-- <view class="in-and-out">
<view class="item" v-if="start.length > 0">
<view style="font-size:30upx;color:#C0C0C0">入住日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ startDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ startWeek }}</view>
</view>
<view class="item text" v-if="start.length == 0">
<view>入住日期</view>
</view>
<view class="item">
<view class="count-border" :class="day == 0 ? 'gray' : 'orange'">
<view class="count" style="font-size:26upx;line-height:26upx;">{{ day }}</view>
</view>
</view>
<view class="item text" v-if="end.length == 0">
<view>离店日期</view>
</view>
<view class="item" v-if="end.length > 0">
<view style="font-size:30upx;color:#C0C0C0">离店日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ endDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ endWeek }}</view>
</view>
</view> -->
<view style="font-size: 32rpx;color:#111;text-align: center;padding:30rpx 0;"> <view style="font-size: 32rpx;color:#111;text-align: center;padding:30rpx 0;">
<text>选择日期</text> <text>选择日期</text>
</view> </view>
...@@ -61,12 +34,12 @@ ...@@ -61,12 +34,12 @@
]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}"> ]" :style="{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0] && index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0] && index == end[1]?'#111':'',color:line == end[0] && index == end[1]?'#FFFFFF':''}">
<view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view> <view style="padding-top:2px;padding-bottom:2px;">{{ item }}</view>
<view class="select-style" v-if="line == start[0] && index == start[1]">入住</view> <!-- <view class="select-style" v-if="line == start[0] && index == start[1]">入住</view>
<view class="select-style" v-if="line == end[0] && index == end[1]">离店</view> <view class="select-style" v-if="line == end[0] && index == end[1]">离店</view>
<view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0"> <view style="font-size:12px;padding-bottom: 3px;" v-if="priceStauts.length > 0">
<view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view> <view v-if="priceStauts[line][index]>0">{{ priceStauts[line][index] }}</view>
<view v-if="priceStauts[line][index] <0">无房</view> <view v-if="priceStauts[line][index] <0">无房</view>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -74,7 +47,7 @@ ...@@ -74,7 +47,7 @@
<view class="submit"> <view class="submit">
<button class="sub-btn" :disabled="!isSub" @click="submit"> <button class="sub-btn" :disabled="!isSub" @click="submit">
<text v-if="isSub">确定</text> <text v-if="isSub">确定</text>
<text v-if="!isSub">请选择入住日期</text> <text v-if="!isSub">请选择日期</text>
</button> </button>
</view> </view>
</scroll-view> </scroll-view>
......
This diff is collapsed.
<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}"> <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.key}} {{item.TagName}}
</view> </view>
</view> </view>
<view class="img-list"> <view class="img-list-box">
<view v-for="(item,index) in imgList" :key="item.ID" class="img-list-item" @click=""> <view v-for="(item,index) in dataList.TagPicList" :key="item.ID" class="img-list-item" @click="">
<view class=""> <view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<image src="" mode=""></image> <image :src="imgBaseUrl+item.Path" mode="aspectFit"></image>
</view> </view>
<view class="img-box" style="position: relative" v-if="item.type==='video'">
<video id="myVideo" :src="imgBaseUrl+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> </view>
...@@ -23,12 +39,11 @@ ...@@ -23,12 +39,11 @@
ID:0, ID:0,
navList:[], navList:[],
curNavIndex:0, curNavIndex:0,
imgList:[] dataList:[],
imgBaseUrl:"",
controls:false,//显示默认控件
videoContext:""
} }
},
components: {
}, },
watch:{ watch:{
curNavIndex(val){ curNavIndex(val){
...@@ -41,15 +56,16 @@ ...@@ -41,15 +56,16 @@
}); });
}, },
onLoad(option) { onLoad(options) {
if (options && options.id) { if (options && options.id) {
this.ID = options.id this.ID = options.id
this.getDetail() this.getDetail()
} }
this.imgBaseUrl="http://192.168.20.214:8130"
}, },
methods: { methods: {
//获取详情 //获取详情
getDetail(index) { getDetail(index=0) {
this.request2({ this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails', url: '/api/AppletDining/GetTicketCouponsDetails',
data: { data: {
...@@ -59,13 +75,58 @@ ...@@ -59,13 +75,58 @@
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.navList = res.data.AllPicList; this.navList = res.data.AllPicList;
this.imgList=res.data.AllPicList[index].TagPicList this.dataList=res.data.AllPicList[index]
console.log(this.imgList) 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'
}
})
console.log(this.dataList)
} }
} }
); );
}, },
changeNav(index){
this.curNavIndex=index
this.getDetail(index)
},
//预览图片
previewImage(i,url) {
uni.previewImage({
urls: [this.imgBaseUrl+url],
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {
console.log(data.errMsg);
},
fail: function(err) {
console.log(err.errMsg);
},
},
});
},
enlarge(file) {
// 全屏
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({
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)
},
} }
} }
</script> </script>
...@@ -74,6 +135,9 @@ ...@@ -74,6 +135,9 @@
.img-list{ .img-list{
.img-navs{ .img-navs{
display: flex; display: flex;
padding: 20rpx 45rpx;
overflow-x: scroll;
overflow-y: hidden;
.nav-btn{ .nav-btn{
width: 230rpx; width: 230rpx;
height: 60rpx; height: 60rpx;
...@@ -83,12 +147,36 @@ ...@@ -83,12 +147,36 @@
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
vertical-align: middle; line-height: 60rpx;
margin-right: 30rpx;
} }
.check-nav{ .check-nav{
background-color: #111111; background-color: #111111;
color: #FFFFFF; color: #FFFFFF;
} }
.last-nav{
margin-right: 0 !important;
}
}
.img-list-box{
padding: 0 45rpx;
.img-list-item{
.img-box{
width: 315rpx;
height: 315rpx;
background-color: #E7E7E7;
border-radius: 20rpx;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
#myVideo{
width: 100%;
height: 100%;
}
}
}
} }
} }
</style> </style>
...@@ -96,9 +96,9 @@ ...@@ -96,9 +96,9 @@
</template> </template>
<script> <script>
import rangeSlider from "./components/range-slider.vue" // import rangeSlider from "./components/range-slider.vue"
import canlendar from "./components/time/index.vue" // import canlendar from "./components/time/index.vue"
import Cascade from "./components/cascade.vue" // import Cascade from "./components/cascade.vue"
export default { export default {
data() { data() {
return { return {
...@@ -153,9 +153,9 @@ ...@@ -153,9 +153,9 @@
} }
}, },
components: { components: {
rangeSlider, // rangeSlider,
canlendar, // canlendar,
Cascade // Cascade
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
......
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