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.
364 lines
8.1 KiB
364 lines
8.1 KiB
<template>
|
|
<view class="bg">
|
|
<view class="search-box flex-between">
|
|
<view class="search" @click="gotoPath('/subPackages/search/search')">
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/search.png" class="search-img"></image>
|
|
请输入导游姓名/产品名称
|
|
</view>
|
|
<view class="kefu" @click="gotoPath('/subPackages/onlineService/index')">
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/kefu.png" class="kefu-img"></image>
|
|
客服
|
|
</view>
|
|
</view>
|
|
|
|
<swiper class="top-banner" :circular="true" :interval="6000" indicator-active-color="#fff"
|
|
:duration="800" :indicator-dots="true" :autoplay="true" v-if="topBanner">
|
|
<swiper-item v-for="(item, index) in topBanner" :key="index" @click.stop="gotoUrlNew(item)">
|
|
<image class="top-banner" :src="showImg(item.head_img)" mode="aspectFill"></image>
|
|
</swiper-item>
|
|
</swiper>
|
|
|
|
<!-- 发现宝藏导游 -->
|
|
<view class="title-box flex-between">
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/title1.png" class="title-img"></image>
|
|
<view class="title-btn flex-around" @click="gotoDy">
|
|
探索更多
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/rightIcon.png" class="rightIcon"></image>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="type-box">
|
|
<view v-for="(item,index) in typeList" :key="index" :class="['type-item', {'type-active': index == typeIndex}]" @click="typeIndex = index;getTouristList()">
|
|
{{item.title}}
|
|
</view>
|
|
</view>
|
|
|
|
<view class="tour-box">
|
|
<navigator :url="'/subPackages/daoyou/detail?id=' + item.id" v-for="(item,index) in tourList" :key="index" class="tour-item">
|
|
<image :src="showImg(item.image)" mode="aspectFill" class="tour-img"></image>
|
|
<!-- <image src="https://static.ticket.sz-trip.com/tourist/index/play.png" class="playImg"></image> -->
|
|
<!-- <view class="time">{{item.time}}</view> -->
|
|
</navigator>
|
|
</view>
|
|
|
|
<!-- 精选线路 -->
|
|
<view class="title-box flex-between">
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/title2.png" class="title-img"></image>
|
|
<view class="title-btn flex-around" @click="gotoPath('/subPackages/line/lineList')">
|
|
探索更多
|
|
<image src="https://static.ticket.sz-trip.com/tourist/index/rightIcon.png" class="rightIcon"></image>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="line-box">
|
|
<navigator :url="'/subPackages/line/detail?id=' + item.id" v-for="(item,index) in lineList" :key="index" class="line-item">
|
|
<image :src="showImg(item.image)" mode="aspectFill" class="line-img"></image>
|
|
<view class="line-content">
|
|
<view class="line-title text-overflowRows">{{item.title}}</view>
|
|
<view class="line-price">{{item.money / 100}}</view>
|
|
</view>
|
|
</navigator>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
imageValue: [],
|
|
topBanner: [],
|
|
typeList: [
|
|
{
|
|
title: '品牌导游',
|
|
id: '2'
|
|
}
|
|
],
|
|
typeIndex: 0,
|
|
tourList: [],
|
|
lineList: []
|
|
}
|
|
},
|
|
onReady() {
|
|
this.getTopBanner()
|
|
this.getLineList()
|
|
this.getTouristList()
|
|
},
|
|
methods: {
|
|
// 获取导游列表
|
|
getTouristList() {
|
|
this.Post({
|
|
type_id: this.typeList[this.typeIndex].id,
|
|
offset: 0,
|
|
limit: 5
|
|
},'/api/goods/getGoodsByDateType').then(res => {
|
|
this.tourList = res.data
|
|
})
|
|
},
|
|
// 获取线路列表
|
|
getLineList() {
|
|
this.Post({
|
|
type_id: 1,
|
|
offset: 0,
|
|
limit: 10
|
|
},'/api/goods/getGoodsByType').then(res => {
|
|
this.lineList = res.data;
|
|
})
|
|
},
|
|
// 获取顶部banner
|
|
getTopBanner() {
|
|
this.Post({
|
|
position: 1,
|
|
type_id: 1
|
|
},'/api/adv/getAdv').then(res => {
|
|
this.topBanner = res.data
|
|
})
|
|
},
|
|
// 2是各种详情页,3是列表专题页面,4是小程序
|
|
gotoUrlNew(item) {
|
|
let url = '';
|
|
switch (item.jump_type) {
|
|
case 0:
|
|
break;
|
|
case 2:
|
|
uni.navigateTo({
|
|
url: item.tdata
|
|
});
|
|
break;
|
|
case 3:
|
|
window.location.href = item.tdata
|
|
// uni.navigateTo({
|
|
// url: '/subPackages/webPage/webPage?url=' + item.tdata
|
|
// });
|
|
break;
|
|
case 4:
|
|
uni.navigateToMiniProgram({
|
|
appId: item.tdata.appid, // 此为appid
|
|
path: item.tdata.page, // 此为首页路径
|
|
envVersion: 'release',
|
|
success: res => {
|
|
// 打开成功
|
|
console.log('打开成功', res);
|
|
},
|
|
fail: err => {
|
|
console.log(err);
|
|
}
|
|
});
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
},
|
|
// 去导游
|
|
gotoDy() {
|
|
uni.switchTab({
|
|
url: '/pages/daoyou/index'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.bg {
|
|
min-height: 100vh;
|
|
background: url('https://static.ticket.sz-trip.com/tourist/index/topBg.png') no-repeat;
|
|
background-size: 100% auto;
|
|
background-color: #F9F5F0;
|
|
padding-bottom: 150rpx;
|
|
}
|
|
|
|
.search-box {
|
|
padding: 20rpx 26.67rpx;
|
|
|
|
.search {
|
|
width: 573rpx;
|
|
height: 60rpx;
|
|
background: rgba(255, 255, 255, .7);
|
|
border: 1px solid #96684F;
|
|
padding: 0 29rpx;
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #666666;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.search-img {
|
|
width: 29.33rpx;
|
|
height: 29.33rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|
|
|
|
.kefu {
|
|
font-weight: 500;
|
|
font-size: 27rpx;
|
|
color: #96684F;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.kefu-img {
|
|
width: 33.33rpx;
|
|
height: 33.33rpx;
|
|
margin-right: 7rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.top-banner {
|
|
width: 697rpx;
|
|
height: 341rpx;
|
|
margin: auto;
|
|
}
|
|
|
|
.title-box {
|
|
margin: 47rpx 26.67rpx 0;
|
|
|
|
.title-img {
|
|
width: 248rpx;
|
|
height: 77.33rpx;
|
|
}
|
|
|
|
.title-btn {
|
|
width: 140rpx;
|
|
height: 47rpx;
|
|
border-radius: 7rpx;
|
|
border: 1px solid #BFBFBF;
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
color: #333333;
|
|
|
|
.rightIcon {
|
|
width: 11.33rpx;
|
|
height: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.type-box {
|
|
display: flex;
|
|
padding: 34rpx 26.67rpx 29rpx;
|
|
overflow-x: auto;
|
|
|
|
.type-item {
|
|
width: 166.67rpx;
|
|
line-height: 53.33rpx;
|
|
text-align: center;
|
|
background-image: url('https://static.ticket.sz-trip.com/tourist/index/typeBg.png');
|
|
background-size: 100% 100%;
|
|
font-weight: 500;
|
|
font-size: 29rpx;
|
|
color: #96684F;
|
|
margin-right: 10rpx;
|
|
}
|
|
.type-active {
|
|
background-image: url('https://static.ticket.sz-trip.com/tourist/index/typeBgs.png');
|
|
background-size: 100% 100%;
|
|
color: #F9F5F0;
|
|
}
|
|
}
|
|
.type-box::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.tour-box {
|
|
overflow-x: auto;
|
|
padding-left: 26.67rpx;
|
|
display: flex;
|
|
|
|
.tour-item {
|
|
background-image: url('https://static.ticket.sz-trip.com/tourist/index/tourBg.png');
|
|
background-size: 100% 100%;
|
|
margin-right: 20rpx;
|
|
position: relative;
|
|
width: 266.73rpx;
|
|
height: 333.4rpx;
|
|
padding: 6rpx;
|
|
box-sizing: border-box;
|
|
|
|
.tour-img {
|
|
width: 253rpx;
|
|
height: 320rpx;
|
|
}
|
|
|
|
.playImg {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
margin: auto;
|
|
}
|
|
|
|
.time {
|
|
position: absolute;
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #FFFFFF;
|
|
right: 19rpx;
|
|
bottom: 30rpx;
|
|
}
|
|
}
|
|
}
|
|
.tour-box::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.line-box {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
overflow-x: auto;
|
|
height: 820rpx;
|
|
margin: 26rpx 0 0 26.67rpx;
|
|
|
|
.line-item {
|
|
width: 467rpx;
|
|
height: 400rpx;
|
|
border: 1rpx solid #96684F;
|
|
margin-right: 13rpx;
|
|
padding: 22rpx;
|
|
box-sizing: border-box;
|
|
|
|
.line-img {
|
|
width: 423rpx;
|
|
height: 233rpx;
|
|
}
|
|
|
|
.line-content {
|
|
height: 120rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
|
|
.line-title {
|
|
font-weight: bold;
|
|
font-size: 28rpx;
|
|
color: #333333;
|
|
line-height: 36rpx;
|
|
}
|
|
|
|
.line-price {
|
|
font-weight: bold;
|
|
font-size: 29rpx;
|
|
color: #DC2525;
|
|
}
|
|
.line-price::before {
|
|
font-size: 23rpx;
|
|
content: '¥';
|
|
}
|
|
.line-price::after {
|
|
font-size: 23rpx;
|
|
content: '起';
|
|
color: rgba(153, 153, 153, 1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.line-box::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
</style>
|