导游中台-游客端
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.

369 lines
8.2 KiB

11 months ago
<template>
11 months ago
<view class="bg">
<view class="search-box flex-between">
11 months ago
<view class="search" @click="gotoPath('/subPackages/search/search')">
11 months ago
<image src="https://static.ticket.sz-trip.com/tourist/index/search.png" class="search-img"></image>
请输入导游姓名/产品名称
11 months ago
</view>
<view class="kefu" @click="gotoPath('/subPackages/onlineService/index')">
11 months ago
<image src="https://static.ticket.sz-trip.com/tourist/index/kefu.png" class="kefu-img"></image>
客服
11 months ago
</view>
</view>
11 months ago
11 months ago
<swiper class="top-banner" :circular="true" :interval="6000" indicator-active-color="#fff"
11 months ago
: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>
11 months ago
<view class="title-btn flex-around" @click="gotoDy">
11 months ago
探索更多
<image src="https://static.ticket.sz-trip.com/tourist/index/rightIcon.png" class="rightIcon"></image>
</view>
</view>
11 months ago
<view class="type-box">
10 months ago
<view v-for="(item,index) in typeList" :key="index" :class="['type-item', {'type-active': index == typeIndex}]" @click="typeIndex = index;getTouristList()">
11 months ago
{{item.title}}
</view>
</view>
11 months ago
<view class="tour-box">
10 months ago
<navigator :url="'/subPackages/daoyou/detail?id=' + item.id" v-for="(item,index) in tourList" :key="index" class="tour-item">
10 months ago
<image :src="showImg(item.goods.image)" mode="aspectFill" class="tour-img"></image>
11 months ago
<!-- <image src="https://static.ticket.sz-trip.com/tourist/index/play.png" class="playImg"></image> -->
<!-- <view class="time">{{item.time}}</view> -->
10 months ago
</navigator>
11 months ago
</view>
<!-- 精选线路 -->
<view class="title-box flex-between">
<image src="https://static.ticket.sz-trip.com/tourist/index/title2.png" class="title-img"></image>
11 months ago
<view class="title-btn flex-around" @click="gotoPath('/subPackages/line/lineList')">
11 months ago
探索更多
<image src="https://static.ticket.sz-trip.com/tourist/index/rightIcon.png" class="rightIcon"></image>
</view>
</view>
<view class="line-box">
10 months ago
<navigator :url="'/subPackages/line/detail?id=' + item.id" v-for="(item,index) in lineList" :key="index" class="line-item">
11 months ago
<image :src="showImg(item.image)" mode="aspectFill" class="line-img"></image>
11 months ago
<view class="line-content">
<view class="line-title text-overflowRows">{{item.title}}</view>
11 months ago
<view class="line-price">{{item.money / 100}}</view>
11 months ago
</view>
10 months ago
</navigator>
11 months ago
</view>
11 months ago
</view>
</template>
<script>
export default {
data() {
return {
10 months ago
imageValue: [],
11 months ago
topBanner: [],
11 months ago
typeList: [
{
title: '品牌导游',
10 months ago
id: '57'
},
{
title: '选项2',
id: '58'
11 months ago
}
],
typeIndex: 0,
10 months ago
tourList: [],
11 months ago
lineList: []
11 months ago
}
},
11 months ago
onReady() {
11 months ago
this.getTopBanner()
this.getLineList()
10 months ago
this.getTouristList()
11 months ago
},
methods: {
10 months ago
// 获取导游列表
getTouristList() {
this.Post({
10 months ago
tag_id: this.typeList[this.typeIndex].id,
10 months ago
offset: 0,
limit: 5
10 months ago
},'/api/tag/getGoodsByTagId').then(res => {
10 months ago
this.tourList = res.data
})
},
11 months ago
// 获取线路列表
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
})
},
11 months ago
// 2是各种详情页,3是列表专题页面,4是小程序
gotoUrlNew(item) {
let url = '';
switch (item.jump_type) {
case 0:
break;
case 2:
uni.navigateTo({
url: item.tdata
});
break;
case 3:
10 months ago
window.location.href = item.tdata
// uni.navigateTo({
// url: '/subPackages/webPage/webPage?url=' + item.tdata
// });
11 months ago
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;
11 months ago
}
},
11 months ago
// 去导游
gotoDy() {
uni.switchTab({
url: '/pages/daoyou/index'
})
}
11 months ago
}
}
</script>
11 months ago
<style lang="scss" scoped>
11 months ago
.bg {
11 months ago
min-height: 100vh;
11 months ago
background: url('https://static.ticket.sz-trip.com/tourist/index/topBg.png') no-repeat;
background-size: 100% auto;
background-color: #F9F5F0;
10 months ago
padding-bottom: 250rpx;
11 months ago
}
11 months ago
.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;
}
}
11 months ago
}
11 months ago
.top-banner {
width: 697rpx;
height: 341rpx;
margin: auto;
11 months ago
}
11 months ago
.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;
}
11 months ago
}
11 months ago
}
11 months ago
11 months ago
.type-box {
display: flex;
11 months ago
padding: 34rpx 26.67rpx 29rpx;
overflow-x: auto;
11 months ago
.type-item {
11 months ago
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%;
11 months ago
font-weight: 500;
11 months ago
font-size: 29rpx;
color: #96684F;
margin-right: 10rpx;
11 months ago
}
.type-active {
11 months ago
background-image: url('https://static.ticket.sz-trip.com/tourist/index/typeBgs.png');
background-size: 100% 100%;
color: #F9F5F0;
11 months ago
}
11 months ago
}
.type-box::-webkit-scrollbar {
display: none;
}
.tour-box {
overflow-x: auto;
10 months ago
overflow-y: hidden;
11 months ago
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;
10 months ago
box-sizing: border-box;
11 months ago
.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;
}
11 months ago
}
}
11 months ago
.tour-box::-webkit-scrollbar {
display: none;
}
11 months ago
11 months ago
.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;
10 months ago
box-sizing: border-box;
11 months ago
.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;
11 months ago
}
</style>