Browse Source

打包

master
chenkainan 1 year ago
parent
commit
e71256a417
  1. 1
      .gitignore
  2. BIN
      dist/favicon.ico
  3. 1
      dist/index.html
  4. 1
      dist/static/css/46.fde794d7.css
  5. 1
      dist/static/css/app.0cd07668.css
  6. 1
      dist/static/css/chunk-vendors.befb54be.css
  7. 1
      dist/static/js/46.1ea5a050.js
  8. 1
      dist/static/js/app.5a057ce3.js
  9. 283
      dist/static/js/chunk-vendors.c33f6caf.js
  10. 2
      src/libs/axios.js
  11. 43
      src/libs/utils.js
  12. 4
      src/router/index.js
  13. 309
      src/views/Index.vue
  14. 79
      src/views/LineList.vue
  15. 315
      src/views/compoents/lineDetail.vue
  16. 68
      src/views/compoents/lineRoute.vue
  17. 48
      src/views/compoents/productDetail.vue

1
.gitignore

@ -1,6 +1,5 @@
.DS_Store
node_modules
/dist
# local env files

BIN
dist/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

1
dist/index.html

@ -0,0 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>地图</title><script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=YVOBZ-MWJ3Z-34IXK-7J2GL-O33US-QLF5X"></script><script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script><script src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script><script defer="defer" src="/static/js/chunk-vendors.c33f6caf.js"></script><script defer="defer" src="/static/js/app.5a057ce3.js"></script><link href="/static/css/chunk-vendors.befb54be.css" rel="stylesheet"><link href="/static/css/app.0cd07668.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but taihulake doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

1
dist/static/css/46.fde794d7.css

@ -0,0 +1 @@
.bg[data-v-e0228542]{width:100%;min-height:100vh;background:#f7f7f7;padding-top:.41333rem}.top-box[data-v-e0228542]{width:9.29333rem;padding:.4rem;margin:0 auto;font-weight:700;font-size:.53333rem;color:#000}.top-box .top-btn[data-v-e0228542]{width:1.82667rem;line-height:.8rem;border-radius:.4rem;border:1px solid #ccc;text-align:center;font-weight:400;font-size:.36rem;color:#000}.item[data-v-e0228542]{width:9.29333rem;height:3.2rem;background:#fff;box-shadow:0 1px .21333rem 0 hsla(0,0%,60%,.35);border-radius:.26667rem;margin:0 auto .44rem;padding:.17333rem;display:flex;justify-content:space-between}.item img[data-v-e0228542]{-o-object-fit:cover;object-fit:cover;width:2.84rem;height:2.84rem;border-radius:.17333rem}.item .content[data-v-e0228542]{padding:.2rem 0;width:5.46667rem}.item .content .title[data-v-e0228542]{font-weight:700;font-size:.44rem;color:#111}.item .content .subtitle[data-v-e0228542]{margin-top:8px;font-weight:500;font-size:.36rem;color:#666}.item .contents[data-v-e0228542]{width:4.53333rem}.item .delLine[data-v-e0228542]{width:.66667rem}.item .delLine img[data-v-e0228542]{width:.4rem;height:.45333rem}

1
dist/static/css/app.0cd07668.css

File diff suppressed because one or more lines are too long

1
dist/static/css/chunk-vendors.befb54be.css

File diff suppressed because one or more lines are too long

1
dist/static/js/46.1ea5a050.js

@ -0,0 +1 @@
"use strict";(self["webpackChunktaihulake"]=self["webpackChunktaihulake"]||[]).push([[46],{46:function(t,e,s){s.r(e),s.d(e,{default:function(){return r}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg"},[t.type?e("div",{staticClass:"top-box flex-between"},[e("div",[t._v("我的行程")]),e("div",{staticClass:"top-btn",on:{click:t.addLine}},[t._v("+添加")])]):t._e(),t._l(t.list,(function(s,i){return e("div",{key:i,staticClass:"item",on:{click:function(e){return t.viewDetail(s)}}},[e("img",{attrs:{src:t.util.showImg(s.image),alt:""}}),e("div",{class:["content",{contents:t.type}]},[e("div",{staticClass:"title"},[t._v(t._s(s.name))]),t.type?e("div",{staticClass:"subtitle text-overflowRows",staticStyle:{display:"flex"}},t._l(s.points,(function(i,n){return e("div",{key:n},[t._v(t._s(i.name)),n+1!=s.points.length?e("span",[t._v("-")]):t._e()])})),0):e("div",{staticClass:"subtitle"},[t._v(t._s(s.points.length)+"个景点")]),t.type?e("div",{staticClass:"subtitle"},[t._v(t._s(s.date))]):t._e()]),t.type?e("div",{staticClass:"delLine flex-center"},[e("img",{attrs:{src:"https://static.ticket.sz-trip.com/yandu/images/map/delLine.png",alt:""},on:{click:function(e){return t.delLine(i)}}})]):t._e()])}))],2)},n=[],a=(s(7658),{data(){return{list:[],type:this.$route.query.type}},mounted(){this.getList()},methods:{getList(){this.post({type:this.$route.query.type?1:"",code:this.$route.query.code},"/api/emap/getLineByCode").then((t=>{this.list=t.data}))},viewDetail(t){sessionStorage.setItem("lineDetail",JSON.stringify(t)),this.$router.push("/")},addLine(){this.$router.push("/")}}}),l=a,u=s(1001),c=(0,u.Z)(l,i,n,!1,null,"e0228542",null),r=c.exports}}]);

1
dist/static/js/app.5a057ce3.js

File diff suppressed because one or more lines are too long

283
dist/static/js/chunk-vendors.c33f6caf.js

File diff suppressed because one or more lines are too long

2
src/libs/axios.js

@ -68,7 +68,7 @@ http.interceptors.response.use(response => {
// 请求
Vue.prototype.get = (params, url, loading) => {
return new Promise((resolve, reject) => {
http.get(url, params, loading)
http.get(url, {params}, loading)
.then(res => {
resolve(res);
})

43
src/libs/utils.js

@ -70,6 +70,49 @@ export default {
} else {
return 'https://tongli.sz-trip.com' + img;
}
},
// 跳回小程序
gotoDetailMini(item) {
console.log(item)
if(item.link_type == 1) {
// 外部小程序
uni.navigateToMiniProgram({
shortLink: item.ext_link
})
return
}else if(item.link_type == 2){
// 外部H5
window.location.href = item.ext_link
return
}
switch (item.genre){
// 景点
case 'ticket':
uni.navigateTo({
url: '/subPackages/ticketBooking/detail?id=' + item.id
})
break;
// 酒店
case 'hotel':
uni.navigateTo({
url: '/subPackages/hotelHomestay/detail?id=' + item.id
})
break;
// 美食
case 'food':
uni.navigateTo({
url: '/subPackages/food/foodDetail?id=' + item.id
})
break;
// 攻略
case 'article':
uni.navigateTo({
url: '/subPackages/travelGuide/detail?id=' + item.id
})
break;
default:
break;
}
}
}
}

4
src/router/index.js

@ -7,13 +7,13 @@ Vue.use(VueRouter);
const routes = [{
path: "/",
name: "index",
meta: {title: "首页", keepAlive: true},
meta: {title: "首页", keepAlive: false},
component: Index,
},
{
path: "/lineList",
name: "lineList",
meta: {title: "", keepAlive: true},
meta: {title: "", keepAlive: false},
component: () =>import("../views/LineList.vue"),
},
];

309
src/views/Index.vue

@ -3,12 +3,12 @@
<div id="mapContainer" class="mapContainer"></div>
<!-- 点位分类 -->
<div class="type-box">
<div class="type-box" v-if="typeShow">
<div :class="['type-item',{'type-active': index == typeIndex}]" v-for="(item,index) in mapType"
@click="getSpotsByCategory(index)">{{item.name}}</div>
</div>
<div class="area-box">
<div class="area-box" v-if="typeShow">
<!-- 区域分类 -->
<div>
<div class="area-item area-items" @click="areaMore = !areaMore">
@ -25,7 +25,11 @@
</div>
<!-- 行程线路 -->
<div>
<div class="area-item area-items" @click="addLine">
<div class="area-item area-items" @click="addLine" v-if="isMyLine">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/myLine.png" alt="" />
我的<br>行程
</div>
<div class="area-item area-items" @click="addLine" v-else>
<img src="https://static.ticket.sz-trip.com/yandu/images/map/addLine.png" alt="" />
添加<br>行程
</div>
@ -39,7 +43,7 @@
<!-- 详情弹框 -->
<van-popup v-model="detailShow" @close="audioPause" :overlay-style="{'background-color': 'rgba(0, 0, 0, 0)'}"
position="bottom" round>
<ProductDetail ref="detailRef" />
<ProductDetail ref="detailRef" :type="productType" :info="detailInfo" :audioSrc="audioSrc" :genreType="genreType"/>
</van-popup>
<!-- 输入线路信息弹框 -->
@ -68,7 +72,16 @@
<!-- 添加线路行程弹框 -->
<van-popup v-model="lineRouteShow" round position="bottom">
<LineRoute :id="lineId" :lineDate="lineDate" ref="lineRouteRef" />
<LineRoute :lineItem="addLineInfo" />
</van-popup>
<!-- 线路详情弹框 -->
<van-popup v-model="lineDetailShow" :overlay="false" :overlay-style="{'background-color': 'rgba(0, 0, 0, 0)'}" round
position="bottom" @close="closeLine" class="linePopup">
<div class="close-LineBtn" @click="closeLine">
退出线路
</div>
<LineDetail @changeCenter="changeMapCenter"/>
</van-popup>
</div>
</template>
@ -77,10 +90,12 @@
import moment from 'moment'
import ProductDetail from './compoents/productDetail'
import LineRoute from './compoents/lineRoute'
import LineDetail from './compoents/lineDetail'
export default {
components: {
ProductDetail,
LineRoute
LineRoute,
LineDetail
},
data() {
return {
@ -88,11 +103,13 @@
mapMarker: null,
basics: {},
mapType: [],
typeShow: true,
typeIndex: -1,
areaList: [],
areaIndex: 0,
areaMore: true,
detailShow: false, //
productType: true,
addLineShow: false, // 线
lineName: '',
lineDate: '',
@ -100,12 +117,30 @@
currentDate: new Date(),
lineRouteShow: false, // 线
lineAddStatus: false, // true
lineId: '',
addLineInfo: '',
maps: [], //
lineDetailShow: false, // 线
lineInfo: {},
detailInfo: {},
audioSrc: '',
genreType: '',
isMyLine: false, // 线
};
},
mounted() {
// if(this.$route.query.token) this.$store.commit('changeUserInfo', {token: 'e80c8c0b-7631-4554-b5be-1f946b42dd8a'})
this.$store.commit('changeUserInfo', {token: 'e80c8c0b-7631-4554-b5be-1f946b42dd8a'})
this.getAreaList()
// 线
if(sessionStorage.getItem('lineDetail') && JSON.parse(sessionStorage.getItem('lineDetail')).points.length > 0) {
setTimeout(() => {
this.showLineDetail()
},500)
}
},
activated() {
},
methods: {
//
@ -115,13 +150,18 @@
if (res.data.length > 0) {
this.getAreaDetail()
this.getCategory()
this.getMyLine()
}
})
},
//
changeArea(index) {
this.areaIndex = index
//
this.mapObj.destroy()
this.getAreaDetail()
this.getCategory()
this.getMyLine()
},
// code
getAreaDetail() {
@ -142,7 +182,7 @@
this.post({
code: this.areaList[this.areaIndex].code
}, '/api/emap/getByCategory').then(res => {
this.mapType = Array.from(res.data)
this.mapType = res.data
if (this.mapType.length > 0) this.getSpotsByCategory(0)
})
},
@ -153,13 +193,26 @@
code: this.areaList[this.areaIndex].code,
category_id: this.mapType[this.typeIndex].id
}, '/api/emap/getSpotsByCategory').then(res => {
console.log(res)
this.maps = res.data
this.lineAddStatus = false
//
this.clearMarkers()
if (this.maps.length > 0) this.setMarkers()
})
},
// 线
getMyLine() {
this.post({
type: 1,
code: this.areaList[this.areaIndex].code
},'/api/emap/getLineByCode').then(res => {
if(res.data.length > 0) {
this.isMyLine = true
}else {
this.isMyLine = false
}
})
},
initMap() {
let centerLat = this.basics.center_poi[1]
let centerLon = this.basics.center_poi[0]
@ -231,13 +284,17 @@
// position: new TMap.LatLng(33.329281, 120.161117)
// }
// ]);
let markers = []
let labels = []
this.maps.forEach(item => {
markers.push({
"styleId": 'marker',
text: item.name,
id: item.goods ? (item.goods.genre == 'food' ? item.goods.id : item.goods.scenic_id) : '', // id
genre: item.goods ? item.goods.genre : '', //
name: item.name, //
address: item.address, //
audioSrc: item.audio_file, //
spotId: item.id, // id
position: new TMap.LatLng(item.poi_gcj02[1], item.poi_gcj02[0])
})
@ -262,7 +319,9 @@
"width": 24,
"height": 30,
"src": 'https://static.ticket.sz-trip.com/yandu/images/map/scenic.png',
"src": this.util.showImg(this.mapType.find(i => {return i.id == this.maps[0].category_id}).icon_image)
"src": this.util.showImg(this.mapType.find(i => {
return i.id == this.maps[0].category_id
}).icon_image)
})
},
//
@ -314,50 +373,61 @@
}
},
//
changeMapCenter() {
this.mapObj.panTo(new TMap.LatLng(33.37307, 120.18467));
changeMapCenter(item) {
this.mapObj.panTo(new TMap.LatLng(item[1], item[0]));
},
//
markerClick(evt) {
console.log(evt, evt.geometry.text)
console.log(evt.geometry)
if (this.lineAddStatus) {
//
this.$dialog.confirm({
title: '',
message: '是否将' + evt.geometry.text + '加入行程?'
message: '是否将' + evt.geometry.name + '加入行程?'
}).then(() => {
this.lineId = 1
this.$refs.lineRouteRef.addLineList()
this.addLineInfo = evt.geometry
}).catch(() => {
})
} else {
this.audioSrc = evt.geometry.audioSrc
this.genreType = evt.geometry.genre
if(['ticket', 'hotel'].includes(evt.geometry.genre)) {
//
this.get({
id: evt.geometry.id
},'/api/scenic/getScenicById').then(res => {
if(res.data) {
this.productType = true
this.detailInfo = res.data
this.detailShow = true
}
})
}else if(evt.geometry.genre == 'food') {
this.get({
goods_id: evt.geometry.id
},'/api/goods/getGoodDetail').then(res => {
if(res.data) {
this.productType = true
this.detailInfo = res.data
this.detailShow = true
}
})
}else {
//
this.detailInfo = {
title: evt.geometry.name,
address: evt.geometry.address,
lon: evt.geometry.position.lng,
lat: evt.geometry.position.lat
}
this.productType = false
this.detailShow = true
}
}
},
// 线
gotoLine() {
// this.MultiPolyline = new TMap.MultiPolyline({
// id: 'polyline-layer',
// map: this.mapObj,
// styles: {
// "style_blue": new TMap.PolylineStyle({
// "width": 4,
// 'color': '#3777FF', //线
// 'borderWidth': 2, //线
// 'borderColor': '#FFF', //线
// 'lineCap': 'butt' //线
// })
// },
// // 线
// geometries: [{
// "id": 'style_blue',
// "styleId": 'style_blue',
// "paths": [new TMap.LatLng(33.347305, 120.136504), new TMap.LatLng(33.323448,
// 120.157053), new TMap.LatLng(33.338249, 120.1832)]
// }]
// })
this.$router.push({
path: '/lineList',
query: {
@ -371,9 +441,20 @@
},
// 线
addLine() {
if(this.isMyLine) {
//
this.$router.push({
path: '/lineList',
query: {
code: this.areaList[this.areaIndex].code,
type: '1'
}
})
}else {
this.lineName = ''
this.lineDate = ''
this.addLineShow = true
}
},
//
lineDateConfirm() {
@ -385,6 +466,9 @@
if (this.lineName.trim().length == 0 || this.lineDate.trim().length == 0) {
this.$toast('请输入行程信息')
} else {
sessionStorage.setItem('lineName', this.lineName)
sessionStorage.setItem('lineDate', this.lineDate)
sessionStorage.setItem('lineCode', this.areaList[this.areaIndex].id)
this.addLineShow = false
this.lineRouteShow = true
}
@ -394,7 +478,21 @@
this.lineRouteShow = false
if (status) {
// marker
// ,
this.post({
code: this.areaList[this.areaIndex].code,
},'/api/emap/getUserSpotsByCategory').then(res => {
if(res.code == 1) {
this.maps = res.data
// true
this.lineAddStatus = true
//
this.typeShow = false
//
this.clearMarkers()
if (this.maps.length > 0) this.setMarkers()
// marker
this.multiMarker.setStyles({
"marker": new TMap.MarkerStyle({
"width": 24,
@ -402,15 +500,118 @@
"src": 'https://static.ticket.sz-trip.com/yandu/images/map/add.png'
})
})
// true
this.lineAddStatus = true
}
})
} else {
this.typeIndex = -1
this.setMarkers(0)
//
this.clearMarkers()
this.typeShow = true
this.lineAddStatus = false
this.setMarkers()
}
},
// 线
showLineDetail() {
//
this.clearMarkers()
//
this.typeShow = false
this.lineDetailShow = true
let data = JSON.parse(sessionStorage.getItem('lineDetail'))
let paths = []
let labels = []
data.points.forEach((item,index) => {
paths.push(
new TMap.LatLng(item.lonlat[1], item.lonlat[0])
)
labels.push({
id: 'label', //
styleId: 'label', // id
position: new TMap.LatLng(item.lonlat[1], item.lonlat[0]), //
content: (index == 0 ? '起' : (index+1 == data.points.length ? '终' : index + 1)).toString(), //
properties: {
//
title: 'label',
},
})
})
//
this.multiLabel = new TMap.MultiLabel({
id: 'label-layer',
map: this.mapObj,
collisionOptions: {
sameSource: true,
}, //
styles: {
label: new TMap.LabelStyle({
color: '#FF7F00', //
size: 16, //
offset: {
x: 0,
y: 0
}, //
angle: 0, //
alignment: 'center', //
verticalAlignment: 'middle', //
backgroundColor: '#fff',
borderRadius: 50,
padding: '8px',
width: 23,
height: 23
}),
},
geometries: labels,
})
// 线
this.MultiPolyline = new TMap.MultiPolyline({
id: 'polyline-layer',
map: this.mapObj,
styles: {
"style_blue": new TMap.PolylineStyle({
"width": 4,
'color': '#3777FF', //线
'borderWidth': 2, //线
'borderColor': '#FFF', //线
'lineCap': 'butt' //线
})
},
// 线
geometries: [{
"id": 'style_blue',
"styleId": 'style_blue',
"paths": paths
}]
})
},
// 退线
closeLine() {
this.lineDetailShow = false
sessionStorage.setItem('lineDetail', null)
//
this.clearMarkers()
// 线
if (this.MultiPolyline) {
this.MultiPolyline.setMap(null);
this.MultiPolyline = null;
}
//
this.typeShow = true
//
this.setMarkers()
}
},
beforeRouteLeave(to, from, next) {
next(vm => {
sessionStorage.setItem('lineDetail', null)
vm.closeLine()
})
}
};
</script>
@ -563,4 +764,22 @@
}
}
}
.linePopup {
overflow: visible;
.close-LineBtn {
width: 147px;
line-height: 67px;
background: rgba(0, 0, 0, .56);
border-radius: 13px;
text-align: center;
font-weight: 500;
font-size: 27px;
color: #FFFFFF;
position: absolute;
right: 20px;
top: -100px;
}
}
</style>

79
src/views/LineList.vue

@ -1,14 +1,25 @@
<template>
<div class="bg">
<div class="item" v-for="(item,index) in list" :key="index">
<!-- 我的行程时显示添加行程 -->
<div class="top-box flex-between" v-if="type">
<div>我的行程</div>
<div class="top-btn" @click="addLine">+添加</div>
</div>
<div class="item" v-for="(item,index) in list" :key="index" @click="viewDetail(item)">
<img :src="util.showImg(item.image)" alt="" />
<div class="content">
<div :class="['content', {'contents': type}]">
<div class="title">{{item.name}}</div>
<div class="subtitle">{{item.points.length}}个景点</div>
<div class="tags" v-if="item.goods_new_tag">
<div class="tag" v-for="(tagItem,tagIndex) in item.goods_new_tag.split(',').slice(0,2)">{{tagItem}}</div>
<div class="subtitle text-overflowRows" v-if="type" style="display: flex;">
<div v-for="(tagItem, tagIndex) in item.points" :key="tagIndex">{{tagItem.name}}<span v-if="tagIndex + 1 != item.points.length">-</span></div>
</div>
<div class="subtitle" v-else>{{item.points.length}}个景点</div>
<div class="subtitle" v-if="type">{{item.date}}</div>
</div>
<div class="delLine flex-center" v-if="type">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/delLine.png" alt="" @click="delLine(index)">
</div>
</div>
</div>
@ -18,7 +29,8 @@
export default {
data() {
return {
list: []
list: [],
type: this.$route.query.type, // type1线
}
},
mounted() {
@ -28,10 +40,20 @@
// code线
getList() {
this.post({
type: this.$route.query.type ? 1 : '',
code: this.$route.query.code
},'/api/emap/getLineByCode').then(res => {
this.list = res.data
})
},
//
viewDetail(item) {
sessionStorage.setItem('lineDetail', JSON.stringify(item))
this.$router.push('/')
},
// 线
addLine() {
this.$router.push('/')
}
}
}
@ -45,6 +67,26 @@
padding-top: 31px;
}
.top-box {
width: 697px;
padding: 30px;
margin: 0 auto;
font-weight: bold;
font-size: 40px;
color: #000000;
.top-btn {
width: 137px;
line-height: 60px;
border-radius: 30px;
border: 1px solid #CCCCCC;
text-align: center;
font-weight: 400;
font-size: 27px;
color: #000000;
}
}
.item {
width: 697px;
height: 240px;
@ -54,6 +96,7 @@
margin: 0 auto 33px;
padding: 13px;
display: flex;
justify-content: space-between;
img {
object-fit: cover;
@ -63,7 +106,6 @@
}
.content {
margin-left: 25px;
padding: 15px 0;
width: 410px;
@ -79,21 +121,18 @@
font-size: 27px;
color: #666666;
}
}
.tags {
display: flex;
margin-top: 15px;
.tag {
font-weight: 500;
font-size: 23px;
color: #71B580;
line-height: 40px;
border-radius: 5px;
border: 1px solid #69AF78;
padding: 0 12px;
margin-right: 13px;
.contents {
width: 340px;
}
.delLine {
width: 50px;
img {
width: 30px;
height: 34px;
}
}
}

315
src/views/compoents/lineDetail.vue

@ -0,0 +1,315 @@
<template>
<div class="bg">
<!-- 景点详情 -->
<div class="info" v-if="info">
<img :src="util.showImg(info.image)" class="info-img">
<div class="info-content">
<div class="title text-overflow">{{info.title}}</div>
<div class="subtitle text-overflow">营业时间{{info.open_time}}-{{info.close_time}}</div>
<div class="subtitle text-overflow">地址{{info.address}}</div>
<div class="location" @click="util.openMap(info)">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/lineLocation.png" alt="">
导航
</div>
</div>
</div>
<div class="title">{{detail.name}}</div>
<div class="subtitle">{{detail.points.length}}个景点</div>
<!-- 线路列表 -->
<div class="box">
<div class="item" v-for="(item,index) in detail.points" :key="index">
<div :class="['line',{'lineF': index == 0, 'lineE': index+1 == detail.points.length, 'lineS': index == selectIndex}]"></div>
<div :class="['num',{'numS': index == selectIndex, 'numE': index+1 == detail.points.length}]">
{{index == 0 ? '起' : ((index+1 == detail.points.length) ? '终' : index + 1)}}
</div>
<div :class="['content', {'contents': selectIndex == index}]" @click="choosePoint(item, index)">
{{item.name}}
</div>
</div>
</div>
<!-- 推荐攻略 -->
<div>
<div class="title">推荐攻略</div>
<div class="strategy-info" @click="util.gotoDetailMini(strategyInfo)">
<img :src="util.showImg(strategyInfo.image)" class="strategy-img">
<div class="strategy-content flex-between">
<div class="strategy-title text-overflowRows">{{strategyInfo.title}}</div>
<div class="strategy-subtitle flex-between">
<div>
<img :src="util.showImg(strategyInfo.author_img)" alt="">
{{strategyInfo.author}}
</div>
<div>
<img src="https://static.ticket.sz-trip.com/yandu/images/map/eye.png" alt="">
{{strategyInfo.view}}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
detail: {},
selectIndex: null,
info: null,
strategyInfo: {}
}
},
mounted() {
this.detail = JSON.parse(sessionStorage.getItem('lineDetail'))
//
this.get({
id: this.detail.article_id
},'/api/article/getArticleById').then(res => {
this.strategyInfo = res.data
})
},
methods: {
//
choosePoint(item,index) {
if(this.selectIndex == index) {
this.info = null
this.selectIndex = null
return;
}
this.selectIndex = index
if(['ticket', 'hotel'].includes(item.goods.genre)) {
//
this.get({
id: item.goods.scenic_id
},'/api/scenic/getScenicById').then(res => {
if(res.data) {
this.info = res.data
this.$emit('changeCenter', item.lonlat)
}
})
}else if(item.goods.genre == 'food') {
this.get({
goods_id: item.goods.id
},'/api/goods/getGoodDetail').then(res => {
if(res.data) {
this.info = res.data
this.$emit('changeCenter', item.lonlat)
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750px;
max-height: 60vh;
overflow-x: hidden;
overflow-y: auto;
padding: 43px 0 96px 27px;
position: relative;
overflow: visible;
}
.title {
font-weight: bold;
font-size: 37px;
color: #111111;
}
.subtitle {
font-weight: 500;
font-size: 24px;
color: #666666;
margin-top: 15px;
}
.box {
margin-top: 49px;
.item {
display: flex;
align-items: center;
padding-left: 41px;
height: 116px;
position: relative;
padding-bottom: 19px;
.line {
width: 0px;
height: 100%;
border-left: 3px dashed #71B580;
position: absolute;
top: 0;
left: 64px;
}
.lineF {
height: 50%;
top: auto;
bottom: 5px;
}
.lineE {
height: 50%;
top: 5px;
}
.num {
width: 53px;
height: 53px;
line-height: 53px;
background: #FFFFFF;
border-radius: 50%;
border: 2px solid #71B580;
text-align: center;
font-weight: bold;
font-size: 32px;
color: #71B580;
position: relative;
}
.numS {
background: #71B580;
color: #FFFFFF;
}
.content {
width: 597px;
height: 97px;
background-image: url('https://static.ticket.sz-trip.com/yandu/images/map/lineBg.png');
background-size: 100% 100%;
font-weight: 500;
font-size: 28px;
color: #333333;
display: flex;
align-items: center;
padding-left: 50px;
}
.contents {
background-image: url('https://static.ticket.sz-trip.com/yandu/images/map/lineBgs.png');
color: #FFFFFF;
}
}
}
.info {
width: 573px;
height: 202px;
background: #FFFFFF;
box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
border-radius: 13px;
position: absolute;
top: -400px;
left: 88px;
padding: 5px;
display: flex;
.info-img {
width: 187px;
height: 187px;
border-radius: 7px;
object-fit: cover;
}
.info-content {
padding: 7px 0 3px;
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 344px;
.title {
font-weight: bold;
font-size: 29px;
color: #333333;
width: 344px;
}
.subtitle {
font-weight: 500;
font-size: 23px;
color: #666666;
width: 344px;
margin-top: 0;
}
.location {
font-weight: bold;
font-size: 23px;
color: #71B580;
display: flex;
align-items: center;
margin-left: auto;
img {
width: 32px;
height: 32px;
margin-right: 5px;
}
}
}
}
.strategy-info {
width: 697px;
height: 213px;
background: #FFFFFF;
box-shadow: 0px 1px 16px 0px rgba(153,153,153,0.35);
border-radius: 20px;
margin-top: 25px;
padding: 13px;
display: flex;
.strategy-img {
object-fit: cover;
width: 187px;
height: 187px;
border-radius: 13px;
}
.strategy-content {
width: 455px;
margin-left: 18px;
flex-direction: column;
padding: 5px 0;
.strategy-title {
font-weight: bold;
font-size: 31px;
color: #111111;
}
.strategy-subtitle {
font-weight: 500;
font-size: 27px;
color: #888888;
width: 100%;
div {
display: flex;
align-items: center;
}
img {
width: 27px;
margin-right: 5px;
}
.strategy-userImg {
width: 37px !important;
height: 37px !important;
}
}
}
}
</style>

68
src/views/compoents/lineRoute.vue

@ -13,7 +13,7 @@
<div class="center-item">
<img :src="util.showImg(item.image)" class="center-img">
<div class="center-content">
<div class="title text-overflow">{{item.title}}{{index}}</div>
<div class="title text-overflow">{{item.title}}</div>
<div class="subtitle text-overflow">营业时间{{item.open_time}}-{{item.close_time}}</div>
<div class="subtitle text-overflow">地址{{item.address}}</div>
<div class="location" @click="util.openMap(item)">
@ -44,28 +44,53 @@
<script>
export default {
props: ['id','lineDate'],
props: ['lineItem'],
data() {
return {
lineDate: sessionStorage.getItem('lineDate'),
list: [],
itemObj: {
image: '/uploads/20240826/a87488f6225789aa19dbb437671d388d.png',
title: '线路推荐-测试',
open_time: '',
close_time: '',
address: '地址'
}
spotIds: []
}
},
mounted() {
this.list = []
this.spotIds = []
},
watch:{
lineItem: {
handler(newVal, oldVal) {
if(newVal) {
this.addLineList()
}
},
immediate: true
}
},
methods: {
addLine() {
this.$parent.$parent.addlineRoute(1)
},
addLineList() {
this.list.push(this.itemObj)
if(['ticket', 'hotel'].includes(this.lineItem.genre)) {
//
this.get({
id: this.lineItem.id
},'/api/scenic/getScenicById').then(res => {
if(res.data) {
this.spotIds.push(this.lineItem.spotId)
this.list.push(res.data)
}
})
}else if(this.lineItem.genre == 'food') {
this.get({
goods_id: this.lineItem.id
},'/api/goods/getGoodDetail').then(res => {
if(res.data) {
this.spotIds.push(this.lineItem.spotId)
this.list.push(res.data)
}
})
}
this.$parent.$parent.lineRouteShow = true
},
// 线
@ -75,8 +100,28 @@
submit(status) {
if(status) {
//
this.post({
name: sessionStorage.getItem('lineName'),
date: sessionStorage.getItem('lineDate'),
scenic_id: sessionStorage.getItem('lineCode'),
spot_id: this.spotIds.toString()
},'/api/emap/addUserLinePoints').then(res => {
console.log(res)
if(res.code == 1) {
this.$toast('添加成功')
setTimeout(() => {
this.$parent.$parent.addlineRoute(0)
},800)
setTimeout(() => {
this.list = []
this.spotIds = []
},2000)
}
})
}else {
//
this.list = []
this.spotIds = []
this.$parent.$parent.addlineRoute(0)
}
}
@ -130,6 +175,7 @@
width: 187px;
height: 187px;
border-radius: 7px;
object-fit: cover;
}
.center-content {

48
src/views/compoents/productDetail.vue

@ -2,33 +2,28 @@
<template>
<div class="bg">
<div class="top flex-between">
标题标题
<div class="top-btn" v-if="type">购买</div>
{{info.title}}
<div class="top-btn" v-if="type" @click="util.gotoDetailMini(info)">购买</div>
</div>
<div class="img-box" v-if="type">
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<img src="https://tongli.sz-trip.com/uploads/20240912/bfc1df32e7bc7cd53781ef6671f88cda.png" alt="" />
<div class="img-box" v-if="type && info.list_images">
<img v-for="(item,index) in info.list_images.split(',')" :src="util.showImg(item)" alt="" />
</div>
<div class="scenic-detail flex-between" :style="{marginTop: type ? '' : '0'}">
<div class="scenic-left flex-between">
<div class="text-overflow" v-if="type">营业时间0900-1700</div>
<div :class="[type ? 'text-overflow' : 'text-overflowRows']">地址盐城市盐都区学富镇周伙盐城市盐都区学富镇周伙</div>
<div class="text-overflow" v-if="type">营业时间{{info.open_time}}-{{info.close_time}}</div>
<div :class="[type ? 'text-overflow' : 'text-overflowRows']">地址{{info.address}}</div>
</div>
<div class="scenic-right flex-between">
<div v-if="type">
<div v-if="type && audioSrc">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/pause.png" v-if="isAudioPlay" @click="audioPlay(false)">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/play.png" v-else @click="audioPlay(true)">
<div>讲解</div>
</div>
<div v-else></div>
<div @click="util.openMap()">
<div @click="util.openMap(info)">
<img src="https://static.ticket.sz-trip.com/yandu/images/map/navigation.png" alt="">
<div>导航</div>
</div>
@ -37,13 +32,10 @@
<div class="scenic-content" v-if="type">
简介:
<div>
草房子乐园是童话文学的IP实景还原是国内较早儿童文学实景体验基地较早乡野童话体验基地和儿童文学研学基地致力于打造集旅游住宿餐饮服务休闲娱乐文化传播研学美育亲子互动青少年实践爱心公益于一体的社会化服务新平台研学赋能景区瞄准研学+新领域建设标准化研学场景葳蕤的田园风光推出亲子研学个性化的消费体验产品和游玩项目
<div v-html="util.formateRichText(info.feature_content)"></div>
</div>
</div>
<!-- 音频讲解 -->
<audio src="" ref="audio" controls v-show="false"></audio>
<audio :src="audioSrc" ref="audio" controls v-show="false" @ended="endAudio"></audio>
</div>
</template>
@ -53,15 +45,27 @@
type: {
type: Boolean,
default: true
},
info: {
type: Object,
detault: {}
},
audioSrc: {
type: String,
detault: ''
},
genreType: {
type: String,
detault: ''
}
},
data() {
return {
isAudioPlay: false,
isAudioPlay: false
}
},
mounted() {
this.$refs.audio.src = "https://static.ticket.sz-trip.com/uploads/20220419/47fcfa763aa0d3283a2d47e3cce71428.mp3"
this.$refs.audio.src = this.util.showImg(this.audioSrc)
},
methods: {
audioPlay(status) {
@ -73,6 +77,10 @@
this.$refs.audio.pause()
this.isAudioPlay = false
}
},
//
endAudio() {
this.isAudioPlay = false
}
}
}

Loading…
Cancel
Save