You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
191 lines
4.2 KiB
191 lines
4.2 KiB
1 year ago
|
<template>
|
||
|
<view class="bg">
|
||
|
<view class="topImg relative">
|
||
|
<img v-if="headImg" :src="showImg(headImg)" class="topImg" mode="aspectFill">
|
||
|
<view class="icon-back" :style="{top:systemInfo.textTop,left:'19rpx'}" @click="goBack()" >
|
||
|
<uni-icons type="left" size="24" color="#242424"></uni-icons>
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
|
||
|
<view class="goodBox">
|
||
|
<navigator :url="'/subPackages/ticketBooking/detail?id='+item.id" class="goodItem" v-for="(item,index) in list" :key="index">
|
||
|
<image class="left-image" :src="showImg(item.image||'')" mode="aspectFill"></image>
|
||
|
<view class="contentBox flex-column flex-1 w-1rpx">
|
||
|
<view class="title text-overflowRows">{{item.title}}</view>
|
||
|
<view class="subtitle flex">
|
||
|
<img class="address-icon flex-shrink-0" src="https://tongli.sz-trip.com/uploads/20240826/c937c7f6509de9cc2961cb0984d3c526.png">
|
||
|
<view class="text-overflow">{{item.address}}</view>
|
||
|
</view>
|
||
|
<view class="priceBox">
|
||
|
<view class="price">{{showPrice(item.price)}}</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</navigator>
|
||
|
</view>
|
||
|
<view class="finished-text" v-if="finished">没有更多数据了</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default{
|
||
|
data(){
|
||
|
return {
|
||
|
systemInfo: {
|
||
|
height:"0px",
|
||
|
textHeight:"0px",
|
||
|
textTop:"0px",
|
||
|
contentTop: '0px',
|
||
|
},
|
||
|
|
||
|
list: [],
|
||
|
finished: false,
|
||
|
headImg:null,
|
||
|
|
||
|
type_id: 10,//演出票务的景点分类id
|
||
|
}
|
||
|
},
|
||
|
onShow() {
|
||
|
this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/8653c32761e01ee683505eddba1ae22b.png'
|
||
|
this.finished = false
|
||
|
this.getList()
|
||
|
// this.getHeadImg('piaowu')
|
||
|
},
|
||
|
onLoad(options) {
|
||
|
let that = this
|
||
|
uni.getSystemInfo({
|
||
|
success(res) {
|
||
|
console.log(res)
|
||
|
that.systemInfo.height =res.windowHeight+'px'
|
||
|
const menu=uni.getMenuButtonBoundingClientRect()
|
||
|
that.systemInfo.textHeight=menu.height+"px"
|
||
|
that.systemInfo.textTop=menu.top+"px"
|
||
|
that.systemInfo.contentTop = (menu.height + menu.top)+"px"
|
||
|
console.log(that.systemInfo)
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
// 价格显示
|
||
|
showPrice(price) {
|
||
|
return (price && price != 0) ? (price / 100).toFixed(0) : '0'
|
||
|
},
|
||
|
getHeadImg(type){
|
||
|
this.headImg = null
|
||
|
this.Post(
|
||
|
{
|
||
|
type,
|
||
|
},
|
||
|
'https://yjdtadmin.sz-trip.com/api/public_service/getKumgangHeadImgList'
|
||
|
).then(res => {
|
||
|
this.headImg = res.data[0].image
|
||
|
});
|
||
|
},
|
||
|
// 根据景点标签获取景点列表
|
||
|
getList(){
|
||
|
this.Post({scenic_type_id: this.type_id,offset: this.list.length,limit: 10},
|
||
|
'api/Scenic/getScenicByType').then(res => {
|
||
|
this.list = [...this.list, ...res.data];
|
||
|
if (res.data.length < 10) {
|
||
|
this.finished = true
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
},
|
||
|
onReachBottom() {
|
||
|
setTimeout(() => {
|
||
|
if (!this.finished) this.getList()
|
||
|
},1000)
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
*{
|
||
|
box-sizing: border-box;
|
||
|
font-family: PingFangSC;
|
||
|
}
|
||
|
.bg{
|
||
|
min-height: 100vh;
|
||
|
background: #FFFFFF;
|
||
|
}
|
||
|
.topImg{
|
||
|
width: 100%;
|
||
|
height: 440rpx;
|
||
|
.icon-back{
|
||
|
position: absolute;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
z-index: 50;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
.goodBox{
|
||
|
width: 100%;
|
||
|
z-index: 2;
|
||
|
padding: 26rpx;
|
||
|
|
||
|
.goodItem{
|
||
|
width: 100%;
|
||
|
height: 226rpx;
|
||
|
background: #FFFFFF;
|
||
|
box-shadow: 0rpx 0rpx 9rpx 0rpx rgba(153,153,153,0.38);
|
||
|
margin-bottom: 26rpx;
|
||
|
display: flex;
|
||
|
border-radius: 13rpx;
|
||
|
.left-image{
|
||
|
width: 280rpx;
|
||
|
height: 226rpx;
|
||
|
border-radius: 13rpx;
|
||
|
}
|
||
|
|
||
|
.contentBox{
|
||
|
padding: 20rpx;
|
||
|
justify-content: space-between;
|
||
|
|
||
|
.title{
|
||
|
width: 100%;
|
||
|
font-weight: bold;
|
||
|
font-size: 31rpx;
|
||
|
color: #000000;
|
||
|
}
|
||
|
|
||
|
.subtitle{
|
||
|
font-weight: 500;
|
||
|
font-size: 27rpx;
|
||
|
color: #666666;
|
||
|
align-items: center;
|
||
|
|
||
|
.address-icon{
|
||
|
width: 21rpx;
|
||
|
height: 25rpx;
|
||
|
margin-right: 9rpx;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.priceBox{
|
||
|
.price{
|
||
|
font-family: PingFang SC;
|
||
|
font-weight: bold;
|
||
|
font-size: 33rpx;
|
||
|
color: #F02A2A;
|
||
|
text-align: right;
|
||
|
}
|
||
|
.price::before{
|
||
|
content: '¥';
|
||
|
color: #F02A2A;
|
||
|
font-size: 24rpx;
|
||
|
}
|
||
|
.price::after{
|
||
|
content: '起';
|
||
|
color: #999;
|
||
|
font-size: 24rpx;
|
||
|
font-weight: normal;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|