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

1

parent 3b03bc16
......@@ -750,6 +750,13 @@
}
},{
"path": "imgList"
},
{
"path": "buyNotice",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
}
]
}
......
......@@ -220,7 +220,6 @@
this.active = i;
},
previewImage(i) {
console.log(i)
uni.previewImage({
urls: this.detailData.BannerList,
current: i,
......
......@@ -24,15 +24,6 @@
</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>
</template>
......
......@@ -2,34 +2,7 @@
<view class="content">
<scroll-view :scroll-y="true" style="height: 100%;">
<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;">
<text>选择日期</text>
</view>
......@@ -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':''}">
<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 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">无房</view>
</view>
</view> -->
</view>
</view>
</view>
......@@ -74,7 +47,7 @@
<view class="submit">
<button class="sub-btn" :disabled="!isSub" @click="submit">
<text v-if="isSub">确定</text>
<text v-if="!isSub">请选择入住日期</text>
<text v-if="!isSub">请选择日期</text>
</button>
</view>
</scroll-view>
......
......@@ -2,12 +2,11 @@
<view style="height: 100vh; overflow: hidden;width:100vw;">
<scroll-view scroll-y="true" style="width: 100%;height: 100%;" @scroll="scroll">
<view style="height: 700rpx;position: relative;z-index: 1;" :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>
</view>
<image class="banner-img" :src="imgBaseUrl+details.AllPicList[0].TagPicList[0].Path" mode="aspectFit" @click="goUrl"></image>
</view>
<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>
</view>
<image class="banner-img" :src="imgBaseUrl+details.AllPicList[0].TagPicList[0].Path" mode="aspectFit" @click="goUrl('/pages/ticketCoupons/imgList')"></image>
</view>
<view class="ticket-title" :style="[titleStyleFix]">
<view @click="goback">
<u-icon name="arrow-left" size="44"></u-icon>
......@@ -15,8 +14,7 @@
<view style="flex: 1;margin-left: 30rpx; text-align: left;'background-color':'#000'">{{details.Name}}</view>
</view>
<view style="position: relative;z-index: 2;">
<view
style="position: relative;top: -70px;border-top-left-radius: 30px;border-top-right-radius: 30px;height: 900px;background-color: #FFF;">
<view style="position: relative;top: -70px;border-top-left-radius: 30px;border-top-right-radius: 30px;background-color: #FFF;">
<view class="baseinfo">
<view class="info1">
<view class="name">
......@@ -24,8 +22,7 @@
</view>
<view class="score">
{{details.ScoreNum}}
<text
v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text>
<text v-if="details.ScoreNum===1||details.ScoreNum===2||details.ScoreNum===3||details.ScoreNum===4||details.ScoreNum===5">.0</text>
</view>
</view>
<view class="info2">
......@@ -35,12 +32,10 @@
<view class="info3">
<view class="tag-box">
<view v-for="(_item,_index) in details.ScenicSpotTag" :key="_index">
<u-tag :text="_item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E"
size="mini" class="tag" v-if="_item"></u-tag>
<u-tag :text="_item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" class="tag" v-if="_item"></u-tag>
</view>
<view v-for="(_item,_index) in details.GeographicTag" :key="_index">
<u-tag :text="_item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E"
size="mini" class="tag" v-if="_item"></u-tag>
<u-tag :text="_item" bg-color="#FFF" border-color="#DFBE6E" color="#DFBE6E" size="mini" class="tag" v-if="_item"></u-tag>
</view>
</view>
<view class="policy-detail">
......@@ -75,13 +70,15 @@
明日票
</view>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===3}" @click="changeCheckTicketNavIndex(3)">
其他日期>
其他日期
</view>
<calendar ref="calendar" :insert="false" :selected="calendar" @confirm="confirm"></calendar>
</view>
<view >
<view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box"
:class="{'last-item':index==details.mealList.length-1}"
>
<view>
<view v-for="(item,index) in details.mealList" :key="index" class="ticket-list-box" :class="{'last-item':index==details.mealList.length-1}">
<view class="ticket-key">
{{item.Key}}
</view>
......@@ -94,9 +91,10 @@
<text class="price-pre"></text>{{_item.HPriceB}}<text class="price-nex"></text>
</view>
<view class="tag">
<image class="tag-img" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/likeruyuan.png" mode="aspectFit" v-if="_item.IsSameDayBuy==1"></image>
<image class="tag-img" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/likeruyuan.png"
mode="aspectFit" v-if="_item.IsSameDayBuy==1"></image>
<view class="tag-item" v-if="_item.SubscribeTime||_item.ChangeTickets">
<text >{{_item.SubscribeTime}}</text>
<text>{{_item.SubscribeTime}}</text>
<text class="gap">{{_item.ChangeTickets}}</text>
</view>
</view>
......@@ -113,7 +111,7 @@
<view class="ticket-sell">
<view class="sell">已售 {{_item.SaleCount}}</view>
<view class="vertical-line"></view>
<view class="buy-know">购买须知</view>
<view class="buy-know" @click="goUrl('/pages/ticketCoupons/buyNotice')">购买须知</view>
</view>
</view>
</view>
......@@ -145,19 +143,22 @@
</view>
</view>
</scroll-view>
<!-- 弹出日历 -->
</view>
</template>
<script>
let timer
import calendar from "./components/uni-calendar/uni-calendar.vue"
export default {
components: {
calendar
},
data() {
return {
ID: 0,
Date: "", //日期
details: {},
typeList: [{
Id: 0,
......@@ -169,16 +170,21 @@
boxOption: 0,
navsOption: 0,
titleStyle: {},
titleStyleFix:{},
titleStyleFix: {},
active: 0,
mainColor: '',
controls: false, //显示默认控件
videoContext:'',
checkTicketNavIndex:1,
imgBaseUrl:""
videoContext: '',
checkTicketNavIndex: 1,
imgBaseUrl: "",
calendar: [{
date:"",
info: ''
}], //日历高亮
}
},
onLoad(options) {
......@@ -187,7 +193,7 @@
this.ID = options.id
this.getDetail()
}
this.imgBaseUrl="http://192.168.20.214:8130"
this.imgBaseUrl = "http://192.168.20.214:8130"
uni.getSystemInfo({
success(res) {
that.titleStyle = {
......@@ -195,23 +201,35 @@
paddingTop: `${res.statusBarHeight}px`,
opacity: "0%"
};
that.titleStyleFix={
that.titleStyleFix = {
height: "45px",
position:'fixed',
top:'0',
left:'0',
position: 'fixed',
top: '0',
left: '0',
paddingTop: `${res.statusBarHeight}px`,
'background-color':'#f6f6f6',
'background-color': '#f6f6f6',
opacity: "0%"
}
},
});
this.mainColor = this.$uiConfig.mainColor;
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
this.Date = today
this.calendar.date=today
},
methods: {
goUrl(){
//选择其他日期门票
confirm(e){
this.Date=e.fulldate
this.calendar[0].date=e.fulldate
this.getDetail()
this.$forceUpdate()
},
goUrl(url) {
uni.navigateTo({
url: "/pages/ticketCoupons/imgList?id="+ this.ID,
url: url + "?id=" + this.ID+"&Date="+this.Date,
})
},
//获取详情
......@@ -219,7 +237,8 @@
this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails',
data: {
ID: this.ID
ID: this.ID,
BuyDate: this.Date
}
},
res => {
......@@ -245,28 +264,28 @@
changeHandler(i) {
this.active = i;
},
previewImage(i) {
console.log(i)
uni.previewImage({
urls: this.details.BannerList,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {},
fail: function(err) {
console.log(err.errMsg);
},
},
});
},
// previewImage(i) {
// console.log(i)
// uni.previewImage({
// urls: this.details.BannerList,
// current: i,
// longPressActions: {
// itemList: ["发送给朋友", "保存图片", "收藏"],
// success: function(data) {},
// fail: function(err) {
// console.log(err.errMsg);
// },
// },
// });
// },
scroll(e) {
this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5);
this.titleStyle.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) +
"%";
"%";
this.tooltipShow = false
this.titleStyleFix.opacity = ((e.detail.scrollTop - 100) < 0 ? 0 : Math.floor(e.detail.scrollTop - 100)) +
"%";
"%";
this.$forceUpdate()
},
goback() {
......@@ -290,11 +309,11 @@
this.controls = true
}
},
goMap(name, lon, lat) {
console.log(name, lon, lat)
let newLat=parseFloat(lat)
let newLon=parseFloat(lon)
let newLat = parseFloat(lat)
let newLon = parseFloat(lon)
wx.openLocation({
latitude: newLat,
longitude: newLon,
......@@ -309,20 +328,39 @@
}
})
},
changeCheckTicketNavIndex(i){
this.checkTicketNavIndex=i
}
// 选择门票日期
changeCheckTicketNavIndex(i) {
this.checkTicketNavIndex = i
if (i === 1) {
let d = new Date();
let today = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`
this.Date = today
this.getDetail()
this.$forceUpdate()
} else if (i === 2) {
let d = new Date();
let tomorrow = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()+1}`
this.Date = tomorrow
this.getDetail()
this.$forceUpdate()
} else if (i === 3) {
this.$refs.calendar.open();
}
},
}
}
</script>
<style lang="scss" scoped>
.banner-img{
.banner-img {
width: 750rpx;
height: 700rpx;
// background-color: #ff0;
}
.ticket-title {
line-height: 45px !important;
font-size: 16px;
......@@ -546,6 +584,7 @@
height: 20rpx;
background-color: #ECF1F4;
}
.ticket-title {
// width: 70rpx;
height: 50rpx;
......@@ -557,6 +596,7 @@
// line-height: 44rpx;
position: relative;
margin-bottom: 40rpx;
.ticket-title-bg {
width: 70rpx;
height: 10rpx;
......@@ -569,16 +609,18 @@
opacity: 0.6;
}
}
.ticket-info {
padding: 50rpx 45rpx;
.ticket-navs{
.ticket-navs {
// height: 140rpx;
display: flex;
align-items: center;
margin-bottom: 40rpx;
.ticket-nav{
.ticket-nav {
height: 60rpx;
background-color: #ECF1F4;
border-radius: 20rpx;
......@@ -591,37 +633,43 @@
padding: 0 30rpx;
margin-right: 20rpx;
}
.check-ticket-nav{
.check-ticket-nav {
background-color: #111111 !important;
color: #FFFFFF !important;
}
}
.ticket-list-box{
.ticket-list-box {
margin-bottom: 50rpx;
.ticket-key{
.ticket-key {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
margin-bottom: 25rpx;
}
.ticket-list{
.ticket-list {
padding: 40rpx 40rpx 0rpx 40rpx;
background-color: #F4F4F4;
.ticket-list-item{
.ticket-list-item {
padding-bottom: 30rpx;
margin-bottom: 30rpx;
border-bottom: 2rpx solid #E4E4E4;
position: relative;
.TicketName{
.TicketName {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
margin-bottom: 20rpx;
}
.price{
.price {
font-size: 40rpx;
font-family: PingFang SC;
font-weight: 500;
......@@ -629,25 +677,30 @@
position: absolute;
top: 0;
right: 0;
.price-pre{
.price-pre {
font-size: 22rpx;
}
.price-nex{
.price-nex {
font-size: 22rpx;
color: #919191;
}
}
.tag{
.tag {
display: flex;
height: 32rpx;
margin-bottom: 20rpx;
.tag-img{
.tag-img {
width: 105rpx;
height: 32rpx;
background-color: #FFFFFF;
border-radius: 4rpx;
}
.tag-item{
.tag-item {
border: 2rpx solid #DFBE6E;
border-radius: 0px 4rpx 4rpx 0px;
background-color: #F4F4F4;
......@@ -657,19 +710,22 @@
color: #111111;
padding: 0 14rpx;
}
.gap{
.gap {
margin-left: 15rpx;
}
}
// <!-- 无忧退款 -->
.WorryFreeRefund{
.WorryFreeRefund {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: bold;
color: #DFBE6E;
margin-bottom: 15rpx;
}
.pre-buy{
.pre-buy {
width: 114rpx;
height: 60rpx;
background: #111111;
......@@ -683,25 +739,29 @@
align-items: center;
position: absolute;
top: 85rpx;
right:0rpx;
right: 0rpx;
}
.ticket-sell{
.ticket-sell {
display: flex;
align-items: center;
.sell{
.sell {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
// letter-spacing:2rpx
}
.vertical-line{
.vertical-line {
width: 1rpx;
height: 22rpx;
margin: 0 15rpx;
background-color: #111111;
}
.buy-know{
.buy-know {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 800;
......@@ -709,33 +769,39 @@
}
}
}
}
}
.last-item{
border-bottom:none !important;
.last-item {
border-bottom: none !important;
margin-bottom: 0rpx !important;
}
}
.comment-box{
.comment-box {
padding: 50rpx 45rpx;
.score-box{
.score-box {
width: 235rpx;
display: flex;
.score{
.score {
font-size: 60rpx;
font-family: PingFang SC;
font-weight: 700;
color: #F0C253;
line-height: 60rpx;
// background: linear-gradient(0deg, #F0C253 0%, #FDD679 100%);
.score-nex{
.score-nex {
font-size: 24rpx;
font-weight: 500;
line-height: 24rpx;
}
.gap{
.gap {
margin-right: 10rpx;
}
}
......
<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}">
{{item.key}}
<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">
<view v-for="(item,index) in imgList" :key="item.ID" class="img-list-item" @click="">
<view class="">
<image src="" mode=""></image>
<view class="img-list-box">
<view v-for="(item,index) in dataList.TagPicList" :key="item.ID" class="img-list-item" @click="">
<view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<image :src="imgBaseUrl+item.Path" mode="aspectFit"></image>
</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>
......@@ -23,12 +39,11 @@
ID:0,
navList:[],
curNavIndex:0,
imgList:[]
dataList:[],
imgBaseUrl:"",
controls:false,//显示默认控件
videoContext:""
}
},
components: {
},
watch:{
curNavIndex(val){
......@@ -41,15 +56,16 @@
});
},
onLoad(option) {
onLoad(options) {
if (options && options.id) {
this.ID = options.id
this.getDetail()
}
this.imgBaseUrl="http://192.168.20.214:8130"
},
methods: {
//获取详情
getDetail(index) {
getDetail(index=0) {
this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails',
data: {
......@@ -59,13 +75,58 @@
res => {
if (res.resultCode == 1) {
this.navList = res.data.AllPicList;
this.imgList=res.data.AllPicList[index].TagPicList
console.log(this.imgList)
this.dataList=res.data.AllPicList[index]
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>
......@@ -74,6 +135,9 @@
.img-list{
.img-navs{
display: flex;
padding: 20rpx 45rpx;
overflow-x: scroll;
overflow-y: hidden;
.nav-btn{
width: 230rpx;
height: 60rpx;
......@@ -83,12 +147,36 @@
font-family: PingFang SC;
font-weight: 500;
text-align: center;
vertical-align: middle;
line-height: 60rpx;
margin-right: 30rpx;
}
.check-nav{
background-color: #111111;
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>
......@@ -96,9 +96,9 @@
</template>
<script>
import rangeSlider from "./components/range-slider.vue"
import canlendar from "./components/time/index.vue"
import Cascade from "./components/cascade.vue"
// import rangeSlider from "./components/range-slider.vue"
// import canlendar from "./components/time/index.vue"
// import Cascade from "./components/cascade.vue"
export default {
data() {
return {
......@@ -153,9 +153,9 @@
}
},
components: {
rangeSlider,
canlendar,
Cascade
// rangeSlider,
// canlendar,
// Cascade
},
created() {
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