Browse Source

提交

master
chenkainan 1 year ago
parent
commit
92477ba5e7
  1. 2
      dist/index.html
  2. 1
      dist/static/css/102.73f801e1.css
  3. 1
      dist/static/css/131.15fa99e8.css
  4. 2
      dist/static/css/app.afed1be5.css
  5. 2
      dist/static/js/102.bf962f89.js
  6. 1
      dist/static/js/app.1c059339.js
  7. 1
      dist/static/js/app.66991419.js
  8. 5
      src/store/modules/user.js
  9. 78
      src/views/Index.vue
  10. 3
      src/views/LineList.vue
  11. 7
      src/views/compoents/lineDetail.vue

2
dist/index.html

@ -1 +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,user-scalable=0"><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 src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script><script defer="defer" src="/static/js/chunk-vendors.c33f6caf.js"></script><script defer="defer" src="/static/js/app.66991419.js"></script><link href="/static/css/chunk-vendors.befb54be.css" rel="stylesheet"><link href="/static/css/app.b3b1da13.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>
<!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,user-scalable=0"><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 src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script><script defer="defer" src="/static/js/chunk-vendors.c33f6caf.js"></script><script defer="defer" src="/static/js/app.1c059339.js"></script><link href="/static/css/chunk-vendors.befb54be.css" rel="stylesheet"><link href="/static/css/app.afed1be5.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/102.73f801e1.css

@ -0,0 +1 @@
.bg[data-v-526d5b98]{width:100%;min-height:100vh;background:#f7f7f7;padding-top:.41333rem}.title-box[data-v-526d5b98]{height:1.26667rem}.title-header[data-v-526d5b98]{width:100%;height:1.26667rem;padding:0 .36rem;position:fixed;top:0;left:0;font-weight:700;font-size:.48rem;color:#333;background:#fff}.title-header div[data-v-526d5b98]:last-child{width:.26667rem}.top-box[data-v-526d5b98]{width:9.29333rem;padding:.4rem;margin:0 auto;font-weight:700;font-size:.53333rem;color:#000}.top-box .top-btn[data-v-526d5b98]{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-526d5b98]{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-526d5b98]{-o-object-fit:cover;object-fit:cover;width:2.84rem;height:2.84rem;border-radius:.17333rem}.item .content[data-v-526d5b98]{padding:.2rem 0;width:5.46667rem}.item .content .title[data-v-526d5b98]{font-weight:700;font-size:.44rem;color:#111}.item .content .subtitle[data-v-526d5b98]{margin-top:8px;font-weight:500;font-size:.36rem;color:#666}.item .contents[data-v-526d5b98]{width:4.53333rem}.item .delLine[data-v-526d5b98]{width:.66667rem}.item .delLine img[data-v-526d5b98]{width:.4rem;height:.45333rem}.noLine[data-v-526d5b98]{text-align:center;color:#ccc;font-size:.34667rem;margin-top:.26667rem}

1
dist/static/css/131.15fa99e8.css

@ -1 +0,0 @@
.bg[data-v-74df134f]{width:100%;min-height:100vh;background:#f7f7f7;padding-top:.41333rem}.title-box[data-v-74df134f]{height:1.26667rem}.title-header[data-v-74df134f]{width:100%;height:1.26667rem;padding:0 .36rem;position:fixed;top:0;left:0;font-weight:700;font-size:.48rem;color:#333;background:#fff}.title-header div[data-v-74df134f]:last-child{width:.26667rem}.top-box[data-v-74df134f]{width:9.29333rem;padding:.4rem;margin:0 auto;font-weight:700;font-size:.53333rem;color:#000}.top-box .top-btn[data-v-74df134f]{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-74df134f]{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-74df134f]{-o-object-fit:cover;object-fit:cover;width:2.84rem;height:2.84rem;border-radius:.17333rem}.item .content[data-v-74df134f]{padding:.2rem 0;width:5.46667rem}.item .content .title[data-v-74df134f]{font-weight:700;font-size:.44rem;color:#111}.item .content .subtitle[data-v-74df134f]{margin-top:8px;font-weight:500;font-size:.36rem;color:#666}.item .contents[data-v-74df134f]{width:4.53333rem}.item .delLine[data-v-74df134f]{width:.66667rem}.item .delLine img[data-v-74df134f]{width:.4rem;height:.45333rem}.noLine[data-v-74df134f]{text-align:center;color:#ccc;font-size:.34667rem;margin-top:.26667rem}

2
dist/static/css/app.b3b1da13.css → dist/static/css/app.afed1be5.css

File diff suppressed because one or more lines are too long

2
dist/static/js/131.71b32664.js → dist/static/js/102.bf962f89.js

@ -1 +1 @@
"use strict";(self["webpackChunktaihulake"]=self["webpackChunktaihulake"]||[]).push([[131],{2131:function(t,e,i){i.r(e),i.d(e,{default:function(){return u}});var s=function(){var t=this,e=t._self._c;return t.isShow?e("div",{staticClass:"bg"},[e("div",{staticClass:"title-box"},[e("div",{staticClass:"title-header flex-between"},[e("van-icon",{attrs:{name:"arrow-left"},on:{click:t.goBack}}),e("div",[t._v(t._s(t.type?"地图导览":"线路推荐"))]),e("div")],1)]),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.list.length>0?e("div",t._l(t.list,(function(i,s){return e("div",{key:s,staticClass:"item",on:{click:function(e){return t.viewDetail(i)}}},[e("img",{attrs:{src:t.util.showImg(i.points[0].main_image),alt:""}}),e("div",{class:["content",{contents:t.type}]},[e("div",{staticClass:"title"},[t._v(t._s(i.name))]),t.type?e("div",{staticClass:"subtitle text-overflowRows"},t._l(i.points,(function(s,n){return e("span",{key:n},[t._v(t._s(s.name)),n+1!=i.points.length?e("span",[t._v("-")]):t._e()])})),0):e("div",{staticClass:"subtitle"},[t._v(t._s(i.points.length)+"个景点")]),t.type?e("div",{staticClass:"subtitle"},[t._v(t._s(i.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 e.stopPropagation(),t.delLine(i)}}})]):t._e()])})),0):e("div",{staticClass:"noLine"},[t._v("暂无行程")])]):t._e()},n=[],a=(i(7658),{data(){return{list:[],type:this.$route.query.type||"",isShow:!1}},mounted(){this.$route.query.token&&this.$store.commit("changeUserInfo",{token:this.$route.query.token}),this.getList()},methods:{getList(){this.post({type:this.$route.query.type?1:"",code:this.$route.query.code?this.$route.query.code:""},"/api/emap/getLineByCode").then((t=>{if(this.list=t.data,this.$route.query.id){let t=this.list.find((t=>t.id==this.$route.query.id));sessionStorage.setItem("lineDetail",JSON.stringify(t)),this.$router.push("/")}else this.isShow=!0}))},viewDetail(t){sessionStorage.setItem("lineDetail",JSON.stringify(t)),this.$router.push("/")},addLine(){sessionStorage.setItem("addUserLine",1),this.$router.push("/")},delLine(t){this.$dialog.confirm({title:"",message:"是否删除当前行程?"}).then((()=>{this.post({line_id:t.id},"/api/emap/updateUserLine").then((t=>{1==t.code&&(this.$toast("删除成功"),this.getList())}))})).catch((()=>{}))},goBack(){window.history.length<=1?uni.navigateTo({url:"/pages/index/index"}):this.$router.go(-1)}}}),o=a,l=i(1001),r=(0,l.Z)(o,s,n,!1,null,"74df134f",null),u=r.exports}}]);
"use strict";(self["webpackChunktaihulake"]=self["webpackChunktaihulake"]||[]).push([[102],{2102:function(t,e,i){i.r(e),i.d(e,{default:function(){return u}});var s=function(){var t=this,e=t._self._c;return t.isShow?e("div",{staticClass:"bg"},[e("div",{staticClass:"title-box"},[e("div",{staticClass:"title-header flex-between"},[e("van-icon",{attrs:{name:"arrow-left"},on:{click:t.goBack}}),e("div",[t._v(t._s(t.type?"地图导览":"线路推荐"))]),e("div")],1)]),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.list.length>0?e("div",t._l(t.list,(function(i,s){return e("div",{key:s,staticClass:"item",on:{click:function(e){return t.viewDetail(i)}}},[e("img",{attrs:{src:t.util.showImg(i.points[0].main_image),alt:""}}),e("div",{class:["content",{contents:t.type}]},[e("div",{staticClass:"title"},[t._v(t._s(i.name))]),t.type?e("div",{staticClass:"subtitle text-overflowRows"},t._l(i.points,(function(s,n){return e("span",{key:n},[t._v(t._s(s.name)),n+1!=i.points.length?e("span",[t._v("-")]):t._e()])})),0):e("div",{staticClass:"subtitle"},[t._v(t._s(i.points.length)+"个景点")]),t.type?e("div",{staticClass:"subtitle"},[t._v(t._s(i.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 e.stopPropagation(),t.delLine(i)}}})]):t._e()])})),0):e("div",{staticClass:"noLine"},[t._v("暂无行程")])]):t._e()},n=[],a=(i(7658),{data(){return{list:[],type:this.$route.query.type||"",isShow:!1}},mounted(){this.$route.query.token&&this.$store.commit("changeUserInfo",{token:this.$route.query.token}),this.getList()},methods:{getList(){this.post({type:this.$route.query.type?1:"",code:this.$route.query.code?this.$route.query.code:""},"/api/emap/getLineByCode").then((t=>{if(this.list=t.data,this.$route.query.id){let t=this.list.find((t=>t.id==this.$route.query.id));sessionStorage.setItem("lineDetail",JSON.stringify(t)),this.$router.push("/")}else this.isShow=!0}))},viewDetail(t){this.$store.commit("changeLineDetail",t),this.$router.push("/")},addLine(){sessionStorage.setItem("addUserLine",1),this.$router.push("/")},delLine(t){this.$dialog.confirm({title:"",message:"是否删除当前行程?"}).then((()=>{this.post({line_id:t.id},"/api/emap/updateUserLine").then((t=>{1==t.code&&(this.$toast("删除成功"),this.getList())}))})).catch((()=>{}))},goBack(){window.history.length<=1?uni.navigateTo({url:"/pages/index/index"}):this.$router.go(-1)}}}),o=a,l=i(1001),r=(0,l.Z)(o,s,n,!1,null,"526d5b98",null),u=r.exports}}]);

1
dist/static/js/app.1c059339.js

File diff suppressed because one or more lines are too long

1
dist/static/js/app.66991419.js

File diff suppressed because one or more lines are too long

5
src/store/modules/user.js

@ -2,6 +2,7 @@ import { setStore, getStore } from '@/libs/storage'
export default {
state: {
userInfo: getStore({ name: 'userInfo' }) || '', // 保存用户登录信息
lineDetail: getStore({})
},
mutations: {
changeUserInfo(state, data) {
@ -9,6 +10,10 @@ export default {
setStore({ name: 'userInfo', content: state.userInfo, type: 'session' })
if(data && data.token)localStorage.setItem('userInfo', JSON.stringify(data))
},
changeLineDetail(state, data) {
state.lineDetail = data
setStore({ name: 'lineDetail', content: state.lineDetail, type: 'session' })
}
},
getters: {

78
src/views/Index.vue

@ -87,6 +87,7 @@
</template>
<script>
import {getStore} from '@/libs/storage'
import moment from 'moment'
import ProductDetail from './compoents/productDetail'
import LineRoute from './compoents/lineRoute'
@ -128,15 +129,8 @@
};
},
mounted() {
if(this.$route.query.token) this.$store.commit('changeUserInfo', {token: this.$route.query.token})
this.getAreaList()
// 线
if(sessionStorage.getItem('lineDetail') && JSON.parse(sessionStorage.getItem('lineDetail')).points.length > 0) {
setTimeout(() => {
this.showLineDetail()
},500)
}
if(this.$route.query.token) this.$store.commit('changeUserInfo', {token: this.$route.query.token})
// 线
if(sessionStorage.getItem('addUserLine')) {
@ -202,6 +196,12 @@
}, '/api/emap/getSpotsByCategory').then(res => {
this.maps = res.data
this.lineAddStatus = false
// 线
if(this.$store.state.user.lineDetail && this.$store.state.user.lineDetail.points.length > 0) {
return;
}
//
this.clearMarkers()
if (this.maps.length > 0) this.setMarkers()
@ -213,7 +213,7 @@
type: 1,
code: this.areaList[this.areaIndex].code
},'/api/emap/getLineByCode').then(res => {
if(res.data.length > 0) {
if(res.data && res.data.length > 0) {
this.isMyLine = true
}else {
this.isMyLine = false
@ -238,7 +238,16 @@
viewMode: '2D', // 2D3D3D2D0
rotatable: false, //
rotation: 0, //
pitchable: false //
pitchable: false, //
baseMap: {
type: 'vector',//
features: [
// 'base', //
// 'building3d', //
// 'point', // POI
// 'label' //
]
}
});
this.mapObj.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM); //
@ -270,12 +279,20 @@
map: this.mapObj, //
});
this.$nextTick(()=>{
var layerId = imageTile.getId() // ID
// LAYER_LEVEL layerId layerIdgetId
// TMap.constants.LAYER_LEVEL https://lbs.qq.com/webApi/javascriptGL/glDoc/docIndexMap
this.mapObj.moveLayer(layerId, TMap.constants.LAYER_LEVEL.TEXT)
})
//
// this.$nextTick(()=>{
// var layerId = imageTile.getId() // ID
// // LAYER_LEVEL layerId layerIdgetId
// // TMap.constants.LAYER_LEVEL https://lbs.qq.com/webApi/javascriptGL/glDoc/docIndexMap
// this.mapObj.moveLayer(layerId, TMap.constants.LAYER_LEVEL.TEXT)
// })
// 线
if(this.$store.state.user.lineDetail && this.$store.state.user.lineDetail.points.length > 0) {
this.$nextTick(() => {
this.showLineDetail()
})
}
//
// this.markerCluster = new TMap.MarkerCluster({
@ -416,6 +433,7 @@
if(res.data) {
this.productType = true
this.detailInfo = res.data
this.detailInfo.genre = evt.geometry.genre
this.detailShow = true
}
})
@ -437,6 +455,7 @@
lon: evt.geometry.position.lng,
lat: evt.geometry.position.lat
}
console.log(this.detailInfo)
this.productType = false
this.detailShow = true
}
@ -457,7 +476,7 @@
},
// 线
addLine() {
sessionStorage.removeItem('lineDetail')
this.$store.commit('changeLineDetail', {})
if(this.isMyLine) {
//
this.$router.push({
@ -539,7 +558,7 @@
this.lineDetailShow = true
let data = JSON.parse(sessionStorage.getItem('lineDetail'))
let data = this.$store.state.user.lineDetail
let paths = []
let labels = []
@ -560,6 +579,9 @@
})
})
console.log('paths',paths)
console.log('labels',labels)
//
this.multiLabel = new TMap.MultiLabel({
id: 'label-layer',
@ -610,13 +632,13 @@
})
setTimeout(() => {
sessionStorage.removeItem('lineDetail')
}, 500)
this.$store.commit('changeLineDetail', {})
}, 1000)
},
// 退线
closeLine() {
this.lineDetailShow = false
sessionStorage.removeItem('lineDetail')
this.$store.commit('changeLineDetail', {})
//
this.clearMarkers()
// 线
@ -630,11 +652,15 @@
this.setMarkers()
}
},
beforeRouteLeave(to, from, next) {
next(vm => {
vm.closeLine()
})
}
// beforeRouteEnter(to, from, next) {
// console.log(to,from)
// if() {
// next(vm => {
// })
// }
// }
};
</script>

3
src/views/LineList.vue

@ -72,7 +72,8 @@
},
//
viewDetail(item) {
sessionStorage.setItem('lineDetail', JSON.stringify(item))
// sessionStorage.setItem('lineDetail', JSON.stringify(item))
this.$store.commit('changeLineDetail', item)
this.$router.push('/')
},
// 线

7
src/views/compoents/lineDetail.vue

@ -16,10 +16,10 @@
<div class="boxs">
<div class="title">{{detail.name}}</div>
<div class="subtitle">{{detail.points.length}}个景点</div>
<div class="subtitle" v-if="detail && detail.points">{{detail.points.length}}个景点</div>
<!-- 线路列表 -->
<div class="box">
<div class="box" v-if="detail && detail.points">
<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}]">
@ -67,7 +67,7 @@
}
},
mounted() {
this.detail = JSON.parse(sessionStorage.getItem('lineDetail'))
this.detail = this.$store.state.user.lineDetail
//
this.get({
@ -286,6 +286,7 @@
margin-left: 18px;
flex-direction: column;
padding: 5px 0;
align-items: flex-start;
.strategy-title {
font-weight: bold;

Loading…
Cancel
Save