Commit cf863f5d authored by 罗超's avatar 罗超

1

parent c6019f9e
...@@ -718,10 +718,17 @@ ...@@ -718,10 +718,17 @@
"root": "pages/ticketCoupons", "root": "pages/ticketCoupons",
"pages": [ "pages": [
{ {
"path": "list" "path": "list"
},{ },{
"path": "components/time/index" "path": "components/time/index"
}] },{
"path": "detail",
"enablePullDownRefresh": true,
"style": {
"navigationStyle": "custom"
}
}
]
} }
], ],
"globalStyle": { "globalStyle": {
......
<template>
<view class="cascde">
<view v-for="(item,index) in dataList">
<view class="cascde-item">
<text>{{item.Name}}</text>
<u-icon name="arrow-down" color="#000" size="28rpx" v-if="item.ChildrenList" ></u-icon>
</view>
<view v-for="(_item1) in item.ChildrenList" v-if="item.ChildrenList">
<view class="cascde-item">
<text>{{_item1.Name}}</text>
<u-icon name="arrow-down" color="#000" size="28rpx" v-if="_item1.ChildrenList"></u-icon>
</view>
<view v-for="(_item2) in _item1.ChildrenList" v-if="_item1.ChildrenList">
<view class="cascde-item">
<text>{{_item2.Name}}</text>
<u-icon name="arrow-down" color="#000" size="28rpx" v-if="_item2.ChildrenList"></u-icon>
</view>
<view v-for="(_item3) in _item2.ChildrenList" v-if="_item2.ChildrenList">
<view class="cascde-item">
<text>{{_item3.Name}}</text>
<u-icon name="arrow-down" color="#000" size="28rpx" v-if="_item3.ChildrenList"></u-icon>
</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>
</template>
<script>
export default {
props:{
dataList:{
type:Array,
default:[]
}
},
data(){
return{
}
}
}
</script>
<style lang="scss" scoped>
.cascde{
width: 750rpx;
box-sizing: border-box;
background-color: #FFFFFF;
border-top: 1rpx solid #DDDDDD;
.cascde-item{
font-size: 28rpx;
padding: 20rpx 32rpx;
border-bottom: 1rpx solid #DDDDDD;
display: flex;
justify-content: space-between;
align-items: center;
}
}
</style>
<template>
<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;padding-left: 6rpx;">
<u-icon name="arrow-left" size="44" color="#000" style="margin-top: 22rpx;"></u-icon>
</view>
<image :src="imgBaseUrl+details.AllPicList[0].TagPicList[0].Path" mode="aspectFit" style="width: 100%,height:100%;"></image>
</view>
<view class="ticket-title" :style="[titleStyle]">
<view @click="goback">
<u-icon name="arrow-left" size="44"></u-icon>
</view>
<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 class="baseinfo">
<view class="info1">
<view class="name">
{{details.Name}}
</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>
</view>
</view>
<view class="info2">
{{details.ID}}条点评
<u-icon name="arrow-down" color="#6E6E6E" size="20rpx" class="icon"></u-icon>
</view>
<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>
</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>
</view>
</view>
<view class="policy-detail">
政策详情
<u-icon name="arrow-down" color="#6E6E6E" size="24rpx" class="icon"></u-icon>
</view>
</view>
<view class="line"></view>
<view class="info4">
<view class="mark-icon">
</view>
<view class="address">
{{details.Address}}
</view>
<view class="see-map" @click="goMap(details.Address,details.Lng,details.Lat)">
地图详情
</view>
</view>
</view>
<view class="empty"></view>
<view class="ticket-info">
<view class="ticket-title">
门票
<text class="ticket-title-bg"></text>
</view>
<view class="ticket-navs">
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===1}" @click="changeCheckTicketNavIndex(1)">
今日票
</view>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===2}" @click="changeCheckTicketNavIndex(2)">
明日票
</view>
<view class="ticket-nav" :class="{'check-ticket-nav':checkTicketNavIndex===3}" @click="changeCheckTicketNavIndex(3)">
其他日期>
</view>
</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 class="ticket-key">
{{item.Key}}
</view>
<view class="ticket-list">
<view v-for="(_item,_index) in item.TicketList" :key="_item.Id" class="ticket-list-item" :class="{'last-item':_index==item.TicketList.length-1}">
<view class="TicketName">
{{_item.TicketName}}
</view>
<view class="price">
<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>
<view class="tag-item" v-if="_item.SubscribeTime||_item.ChangeTickets">
<text >{{_item.SubscribeTime}}</text>
<text class="gap">{{_item.ChangeTickets}}</text>
</view>
</view>
<!-- 无忧退款 -->
<view class="WorryFreeRefund">
<text v-if="_item.IsWorryFreeRefund===0">无忧退款</text>
<text v-if="_item.IsWorryFreeRefund!=0">有条件退</text>
</view>
<!-- 预订按钮 -->
<view class="pre-buy">
预订
</view>
<!-- 已售 -->
<view class="ticket-sell">
<view class="sell">已售 {{_item.SaleCount}}</view>
<view class="vertical-line"></view>
<view class="buy-know">购买须知</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="empty"></view> -->
<!-- 旅客点评 -->
<!-- <view class="comment-box">
<view class="ticket-title">
旅客点评
<text class="ticket-title-bg"></text>
</view>
<view class="evaluate-box">
<view class="score-box">
<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 class="score-nex gap"></text>
<text class="score-nex">不错</text>
</view>
<view class="">
</view>
</view>
</view>
</view> -->
</view>
</view>
</scroll-view>
</view>
</template>
<script>
let timer
export default {
components: {
},
data() {
return {
ID: 0,
details: {},
typeList: [{
Id: 0,
Name: '视频'
}, {
Id: 1,
Name: '图片'
}],
boxOption: 0,
navsOption: 0,
titleStyle: {},
active: 0,
mainColor: '',
controls: false, //显示默认控件
videoContext:'',
checkTicketNavIndex:1,
imgBaseUrl:""
}
},
onLoad(options) {
let that = this
if (options && options.id) {
this.ID = options.id
this.getDetail()
}
this.imgBaseUrl=this.host2
uni.getSystemInfo({
success(res) {
that.titleStyle = {
height: "45px",
paddingTop: `${res.statusBarHeight}px`,
opacity: "0%"
};
},
});
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
// showTips(id, text, showis) {
// clearInterval(timer);
// if (this.eleId == id && this.tooltipShow == true) {
// this.tooltipShow = false
// } else {
// console.log(text, showis)
// if (text != undefined && text != null && text != '' && showis == 1) {
// this.eleId = id;
// this.tooltipBtns = [text]
// this.tooltipShow = true;
// timer = setTimeout(() => {
// this.tooltipShow = false;
// }, 3000)
// } else {
// this.tooltipShow = false;
// }
// }
// },
// clickDescription(e) {
// console.log(e);
// },
//获取详情
getDetail() {
this.request2({
url: '/api/AppletDining/GetTicketCouponsDetails',
data: {
ID: this.ID
}
},
res => {
if (res.resultCode == 1) {
res.data.ScenicSpotTag = res.data.ScenicSpotTag.split(',')
res.data.GeographicTag = res.data.GeographicTag.split(',')
this.details = res.data;
console.log(this.details)
if (res.data.VideoUrl == '') {
this.active = 1
};
this.details.imgs = []
// this.details.BannerList.forEach(x=>{
// let obj= {
// name:x
// }
// this.details.imgs.push(obj)
// })
}
}
);
},
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);
},
},
});
},
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.$forceUpdate()
},
goback() {
uni.navigateBack({
delta: 1,
});
},
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
}
},
getlove() {
// this.request2(
// {
// url: '/api/AppletTrade/GetCollect',
// data: {Type:2,SourceId:this.ID,Id:this.details.CollectId}
// },
// res => {
// if(res.resultCode==1){
// uni.showToast({
// title: res.message,
// icon:'none'
// });
// this.getDetail()
// }
// }
// );
},
goMap(name, lon, lat) {
console.log(name, lon, lat)
let newLat=parseFloat(lat)
let newLon=parseFloat(lon)
wx.openLocation({
latitude: newLat,
longitude: newLon,
scale: 18,
name,
// address:"",
success: (res) => {
console.log(res)
},
fail: (err) => {
console.log(err)
}
})
},
changeCheckTicketNavIndex(i){
this.checkTicketNavIndex=i
}
}
}
</script>
<style lang="scss" scoped>
.ticket-title {
line-height: 45px !important;
font-size: 16px;
text-align: center;
position: fixed;
left: 0;
top: 0;
width: 100%;
color: #111;
box-sizing: content-box;
z-index: 5;
display: flex;
align-items: center;
background-color: #f6f6f6;
padding-left: 6rpx;
}
.label-b {
height: 20px;
padding: 0 3px;
font-size: 13px;
color: #FFF;
border-radius: 4px;
font-weight: bold;
}
.brand-xinx {
width: 100%;
display: flex;
align-items: center;
margin-top: 15px;
}
.brand-xinx-item {
width: 33%;
font-size: 17px;
}
.brand-xinx-item-m {
font-size: 12px;
color: #A4A4A4;
margin: 10px 0;
}
.brand-xinx-item-t {
display: flex;
align-items: flex-end;
font-weight: bold;
}
.brand-x {
width: 100%;
display: flex;
align-items: flex-start;
margin-top: 18px;
}
.brand-x-l {
font-size: 13px;
color: #A4A4A4;
width: 130rpx;
}
.brand-x-r {
font-size: 13px;
color: #1F1F1F;
line-height: 20px;
font-family: PingFang SC;
width: calc(100vw - 40px - 130rpx);
}
.brand-title {
width: 134rpx;
margin-top: 30px;
}
.brand-title image {
width: 100%;
height: auto;
}
.Listbox {
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 10px;
}
.Listbox-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
height: 170rpx;
align-items: center;
justify-content: center;
}
.Listbox-item image {
width: 74rpx;
height: auto;
}
.list-item-text {
width: calc(100vw / 4);
margin-top: 5px;
text-align: center;
font-size: 12rpx;
}
.baseinfo {
padding: 30rpx 45rpx;
.info1 {
display: flex;
justify-content: space-between;
align-items: center;
.name {
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
line-height: 44rpx;
}
.score {
width: 64rpx;
height: 54rpx;
background: linear-gradient(0deg, rgba(228, 177, 53, 0.72), rgba(223, 190, 110, 0));
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 800;
color: #FFFFFF;
line-height: 44rpx;
}
}
.info2 {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #DFBE6E;
line-height: 44rpx;
display: flex;
justify-content: flex-end;
.icon {
margin-left: 10rpx;
}
}
.info3 {
display: flex;
align-items: center;
justify-content: space-between;
.tag-box {
display: flex;
align-items: center;
.tag {
margin-right: 10rpx;
}
}
.policy-detail {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
display: flex;
align-items: center;
.icon {
margin-left: 10rpx;
}
}
}
.line {
height: 1rpx;
background-color: #111111;
opacity: 0.1;
margin: 35rpx 0;
}
.info4 {
height: 70rpx;
display: flex;
align-items: center;
.mark-icon {
width: 22rpx;
margin-right: 20rpx;
}
.address {
width: 420rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
line-height: 44rpx;
margin-right: 70rpx;
}
.see-map {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
line-height: 44rpx;
}
}
}
.empty {
height: 20rpx;
background-color: #ECF1F4;
}
.ticket-title {
// width: 70rpx;
height: 50rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1F1F1F;
background-color: transparent;
// line-height: 44rpx;
position: relative;
margin-bottom: 40rpx;
.ticket-title-bg {
width: 70rpx;
height: 10rpx;
background-color: #DFBE6E;
border-radius: 4px;
position: absolute;
left: 0;
bottom: 6rpx;
z-index: 1;
opacity: 0.6;
}
}
.ticket-info {
padding: 50rpx 45rpx;
.ticket-navs{
// height: 140rpx;
display: flex;
align-items: center;
margin-bottom: 40rpx;
.ticket-nav{
height: 60rpx;
background-color: #ECF1F4;
border-radius: 20rpx;
text-align: center;
line-height: 60rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
padding: 0 30rpx;
margin-right: 20rpx;
}
.check-ticket-nav{
background-color: #111111 !important;
color: #FFFFFF !important;
}
}
.ticket-list-box{
margin-bottom: 50rpx;
.ticket-key{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
margin-bottom: 25rpx;
}
.ticket-list{
padding: 40rpx 40rpx 0rpx 40rpx;
background-color: #F4F4F4;
.ticket-list-item{
padding-bottom: 30rpx;
margin-bottom: 30rpx;
border-bottom: 2rpx solid #E4E4E4;
position: relative;
.TicketName{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
margin-bottom: 20rpx;
}
.price{
font-size: 40rpx;
font-family: PingFang SC;
font-weight: 500;
color: #D91818;
position: absolute;
top: 0;
right: 0;
.price-pre{
font-size: 22rpx;
}
.price-nex{
font-size: 22rpx;
color: #919191;
}
}
.tag{
display: flex;
height: 32rpx;
margin-bottom: 20rpx;
.tag-img{
width: 105rpx;
height: 32rpx;
background-color: #FFFFFF;
border-radius: 4rpx;
}
.tag-item{
border: 2rpx solid #DFBE6E;
border-radius: 0px 4rpx 4rpx 0px;
background-color: #F4F4F4;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
padding: 0 14rpx;
}
.gap{
margin-left: 15rpx;
}
}
// <!-- 无忧退款 -->
.WorryFreeRefund{
font-size: 22rpx;
font-family: PingFang SC;
font-weight: bold;
color: #DFBE6E;
margin-bottom: 15rpx;
}
.pre-buy{
width: 114rpx;
height: 60rpx;
background: #111111;
border-radius: 8rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 800;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 85rpx;
right:0rpx;
}
.ticket-sell{
display: flex;
align-items: center;
.sell{
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
// letter-spacing:2rpx
}
.vertical-line{
width: 1rpx;
height: 22rpx;
margin: 0 15rpx;
background-color: #111111;
}
.buy-know{
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 800;
color: #111111;
}
}
}
}
}
.last-item{
border:none;
margin-bottom: 0rpx !important;
}
}
.comment-box{
padding: 50rpx 45rpx;
.score-box{
width: 235rpx;
display: flex;
.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{
font-size: 24rpx;
font-weight: 500;
line-height: 24rpx;
}
.gap{
margin-right: 10rpx;
}
}
}
}
</style>
...@@ -9,12 +9,29 @@ ...@@ -9,12 +9,29 @@
<view> <view>
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444">
<!-- 推荐排序 --> <!-- 推荐排序 -->
<u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="options1" @change="change"> <u-dropdown-item v-model="msg.OrderBy" :title="optionsTitle[0]" :options="orderOptions" @change="getList">
</u-dropdown-item> </u-dropdown-item>
<!-- 景点类型 --> <!-- 景点类型 -->
<u-dropdown-item v-model="searchObj.enclosure" :title="optionsTitle[1]" :options="options2" @change="change2"></u-dropdown-item> <u-dropdown-item :title="optionsTitle[1]">
<u-dropdown-item v-model="searchObj.sort" :title="optionsTitle[2]" :options="options1" @change="change"> <Cascade :dataList="typeList"></Cascade>
</u-dropdown-item>
<!-- 筛选 -->
<u-dropdown-item :title="optionsTitle[2]" >
<view class="slot-content">
<!-- <view class="u-text-center u-content-color">其他自定义内容</view>-->
<view class="slot-btn" :class="{'check-btn':msg.IsFree!=-1}" @click="changeScreen('IsFree')">是否免费</view>
<view class="slot-btn" :class="{'check-btn':msg.IsSameDayBuy!=-1}" @click="changeScreen('IsSameDayBuy')">是否闪入园</view>
<view class="slot-btn" :class="{'check-btn':msg.IsWorryFreeRefund!=-1}" @click="changeScreen('IsWorryFreeRefund')">是否无忧退款</view>
<view style="flex:1;margin-right: 30rpx;">
<u-button :custom-style="btnStyle" @click="resetPrice">重置</u-button>
</view>
<view style="flex:1;">
<u-button :custom-style="btnStyle2" @click="surePrice">完成</u-button>
</view>
</view>
</u-dropdown-item> </u-dropdown-item>
</u-dropdown> </u-dropdown>
</view> </view>
...@@ -26,26 +43,38 @@ ...@@ -26,26 +43,38 @@
:enable-back-to-top="true" :enable-back-to-top="true"
:enable-flex="true" :enable-flex="true"
@scrolltolower="lower" @scrolltolower="lower"
:style="{ height: '100%' }" style="height: calc(100% - 224rpx); padding-bottom: 0px;"
> >
<view class="ticket-list"> <view class="ticket-list">
<view v-for="(item,index) in dataList" :key="item.ID" class="ticket-list-item"> <view v-for="(item,index) in dataList" :key="item.ID" class="ticket-list-item" @click="goDetail(item.ID)">
<view class="left-box">
<image class="ticket-img" :src="item.CoverImg" mode="aspectFit"></image> <image class="left-box" :src="item.CoverImg" mode="aspectFit"></image>
</view>
<view class="right-box"> <view class="right-box">
<view class="ticket-name"> <view class="ticket-name">
{{item.Name}} {{item.Name}}
</view> </view>
<view class="rate-box"> <view class="rate-box">
<u-rate v-model="item.ScoreNum" active-color="#FEB969"></u-rate> <u-rate inactive-color="#FFF" :current="item.ScoreNum" active-icon="star" disabled active-color="#FEB969"></u-rate>
<view class="rate"> <view class="rate">
{{item.ScoreNum}} {{item.ScoreNum}}
<text v-if="item.ScoreNum.length==1">.0</text> <text v-if="item.ScoreNum===1||item.ScoreNum===2||item.ScoreNum===3||item.ScoreNum===4||item.ScoreNum===5">.0</text>
</view> </view>
</view> </view>
<view class="address">
{{item.Address}}
</view>
<view class="tag-box">
<view v-for="(_item,_index) in item.ScenicSpotTag" :key="_index">
<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 item.GeographicTag" :key="_index">
<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="SalesPrice">
<text class="SalesPrice-pre"></text>{{item.SalesPrice}}<text class="SalesPrice-nex"></text>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -69,10 +98,12 @@ ...@@ -69,10 +98,12 @@
<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"
export default { export default {
data() { data() {
return { return {
dataList:[], dataList:[],//列表数据
typeList:[],//景点类型列表
msg:{ msg:{
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
...@@ -86,99 +117,24 @@ ...@@ -86,99 +117,24 @@
page_count:1, page_count:1,
loading: false, loading: false,
status: "loadmore", status: "loadmore",
count:0, // count:0,
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
showTimePopup:false, showTimePopup:false,
value1: 1,
value2: 2,
searchObj:{
searchKey:"",
sort:1,
enclosure:-1,
rateAndPrice:{
price:{},
priceText:"不限",
rate:[]
},
date:{}
},
tempRateAndPrice:{
price:{},
priceText:"不限",
rate:[]
},
optionsTitle: [ optionsTitle: [
"推荐排序", "推荐排序",
"景点类型", "景点类型",
"筛选" "筛选"
], ],
rates: [ orderOptions: [
{
label:"二星/经济",
value:1
},
{
label:"三星/舒适",
value:2
},
{
label:"四星/高档",
value:3
},
{
label:"五星/豪华",
value:4
}
],
options1: [
{ {
label: '销量最高', label: '销量最高',
value: 1, value: 1,
}, },
], ],
options2: [
{
label: '不限',
value: -1,
},
{
label: '宝镜岩',
value: 1,
},
{
label: '盆景滩',
value: 2,
},
{
label: '芦苇海',
value: 3,
},
{
label: '五彩池',
value: 4,
},
{
label: '镜海',
value: 5,
},
{
label: '犀牛海',
value: 6,
},
{
label: '诺日朗瀑布',
value: 7,
},
{
label: '火花海',
value: 8,
},
],
btnStyle:{ btnStyle:{
borderRadius: '16rpx', borderRadius: '16rpx',
color: '#111', color: '#111',
...@@ -198,7 +154,8 @@ ...@@ -198,7 +154,8 @@
}, },
components: { components: {
rangeSlider, rangeSlider,
canlendar canlendar,
Cascade
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -210,13 +167,18 @@ ...@@ -210,13 +167,18 @@
methods: { methods: {
lower(e) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++; this.msg.pageIndex++;
this.status = "loading"; this.status = "loading";
this.getList(); this.getList();
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
}, },
goDetail(id){
uni.navigateTo({
url: "/pages/ticketCoupons/detail?id="+id,
});
},
chosenDateResult(obj){ chosenDateResult(obj){
this.searchObj.date=obj this.searchObj.date=obj
this.showTimePopup=false this.showTimePopup=false
...@@ -227,58 +189,20 @@ ...@@ -227,58 +189,20 @@
// }) // })
this.showTimePopup=true this.showTimePopup=true
}, },
setHotelRate(rateId){ //筛选重置
let temp=this.tempRateAndPrice.rate.indexOf(rateId)
if(temp==-1){
this.tempRateAndPrice.rate.push(rateId)
}else{
this.tempRateAndPrice.rate.splice(temp,1)
}
},
resetPrice(){ resetPrice(){
this.optionsTitle[2]="价格/星级" this.msg.IsFree=-1;
this.searchObj.rateAndPrice={ this.msg.IsSameDayBuy=-1;
price:{ this.msg.IsWorryFreeRefund=-1;
minValue:0, this.$refs.uDropdown.close();
maxValue:1000 this.getList()
},
priceText:"不限",
rate:[]
}
this.closeDropdown();
}, },
//筛选
surePrice(){ surePrice(){
let result="" this.$refs.uDropdown.close();
if(this.tempRateAndPrice.rate.length>0){ this.getList()
this.rates.forEach(x=>{
if(this.tempRateAndPrice.rate.indexOf(x.value)!=-1){
result+=x.label+","
}
})
}
if(this.tempRateAndPrice.priceText!="不限"){
result+=this.tempRateAndPrice.priceText
}
result=result==""?"价格/星级":result
console.log(result)
this.optionsTitle[2]=result
this.$forceUpdate()
this.searchObj.rateAndPrice=this.tempRateAndPrice
this.closeDropdown();
},
rangechange4(e){
if(e.minValue==0){
if(e.maxValue==1000){
this.tempRateAndPrice.priceText="不限"
}else{
this.tempRateAndPrice.priceText=`¥${e.maxValue}以下`
}
}else if(e.maxValue==1000){
this.tempRateAndPrice.priceText=`¥${e.minValue}以上`
}else{
this.tempRateAndPrice.priceText=`¥${e.minValue} - ¥${e.maxValue}之间`
}
}, },
closeDropdown() { closeDropdown() {
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
}, },
...@@ -286,39 +210,13 @@ ...@@ -286,39 +210,13 @@
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮 // 展开某个下来菜单时,先关闭原来的其他菜单的高亮
// 同时内部会自动给当前展开项进行高亮 // 同时内部会自动给当前展开项进行高亮
this.$refs.uDropdown.highlight(); this.$refs.uDropdown.highlight();
if(index==2){
this.tempRateAndPrice=this.searchObj.rateAndPrice
}
}, },
close(index) { close(index) {
// 关闭的时候,给当前项加上高亮 // 关闭的时候,给当前项加上高亮
// 当然,您也可以通过监听dropdown-item的@change事件进行处理 // 当然,您也可以通过监听dropdown-item的@change事件进行处理
this.$refs.uDropdown.highlight(index); this.$refs.uDropdown.highlight(index);
}, },
change(index) {
let temp = this.options1.find(x => {
if (x.value == index) {
return x
} else {
return false
}
})
this.optionsTitle[0] = temp.label
},
change2(index){
if(index!=-1){
let temp = this.options2.find(x => {
if (x.value == index) {
return x
} else {
return false
}
})
this.optionsTitle[1] = temp.label
}else{
this.optionsTitle[1] = "附近"
}
},
// 获取景点类型 // 获取景点类型
getScenicType(){ getScenicType(){
this.request2({ this.request2({
...@@ -328,8 +226,7 @@ ...@@ -328,8 +226,7 @@
} }
}, },
res => { res => {
console.log(325,res.data) this.typeList=res.data
} }
); );
}, },
...@@ -341,13 +238,24 @@ ...@@ -341,13 +238,24 @@
}, },
res => { res => {
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
res.data.pageData.forEach(item=>{
item.ScenicSpotTag=item.ScenicSpotTag.split(',')
item.GeographicTag=item.GeographicTag.split(',')
})
this.dataList=res.data.pageData; this.dataList=res.data.pageData;
if (this.page_count == 1) { if (this.page_count == 1) {
this.status = "nomore"; this.status = "nomore";
} }
console.log(336,res.data)
} }
); );
},
changeScreen(field){
if(this.msg[field]===-1){
this.msg[field]=1
}else{
this.msg[field]=-1
}
console.log(this.msg)
} }
}, },
} }
...@@ -406,13 +314,41 @@ ...@@ -406,13 +314,41 @@
background: #111111; background: #111111;
color: #FFFFFF; color: #FFFFFF;
} }
.slot-content{
// height: 200rpx;
background-color: #ffffff;
padding: 30rpx;
border-top: 1px solid #c0c4cc;
display: flex;
flex-wrap: wrap;
.slot-btn{
height: 46rpx;
padding: 0 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 44rpx;
color: #333333;
border: 1px solid #333333;
margin-right: 20rpx;
margin-bottom: 20rpx;
border-radius: 23rpx;
}
.check-btn{
background-color: #333333 !important;
color: #ffffff !important;
}
}
.ticket-list{ .ticket-list{
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box;
.ticket-list-item{ .ticket-list-item{
height: 340rpx; min-height: 340rpx;
padding: 30rpx 0; padding: 30rpx 0;
display: flex; display: flex;
// justify-content: space-between; // justify-content: space-between;
border-bottom: 1px solid #E2E2E2;
position: relative;
.left-box{ .left-box{
width: 220rpx; width: 220rpx;
height: 280rpx; height: 280rpx;
...@@ -420,13 +356,11 @@ ...@@ -420,13 +356,11 @@
box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2); box-shadow: 0rpx 10rpx 30rpx 0rpx rgba(36, 36, 36, 0.2);
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
.ticket-img{
width: 100%;
height: 100%;
}
} }
.right-box{ .right-box{
margin-left: 30rpx; margin-left: 30rpx;
width: 440rpx;
.ticket-name{ .ticket-name{
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
...@@ -435,11 +369,44 @@ ...@@ -435,11 +369,44 @@
// justify-content: center; // justify-content: center;
} }
.rate-box{ .rate-box{
height: 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.rate{ .rate{
margin-left: 10rpx; margin-left: 10rpx;
color: #999999; color: #999999;
line-height: 40rpx;
}
}
.address{
// height: 100rpx;
padding: 20rpx 30rpx 20rpx 0;
font-size: 24rpx;
font-family: PingFang SC;
color: #999999;
line-height: 32rpx;
}
.tag-box{
display: flex;
flex-wrap: wrap;
.tag{
margin-right: 10rpx;
}
}
.SalesPrice{
position: absolute;
right: 0;
bottom: 30rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FF3166;
font-size: 36rpx;
line-height: 32rpx;
margin-top: 10rpx;
text-align: right;
.SalesPrice-pre,.SalesPrice-nex{
font-size: 20rpx;
} }
} }
} }
......
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