Commit d1e372ed authored by 华国豪's avatar 华国豪 🙄

1

parent 665eb77e
...@@ -19,21 +19,19 @@ export default { ...@@ -19,21 +19,19 @@ export default {
props: ['baiduMapData'], props: ['baiduMapData'],
data(){ data(){
return { return {
dataList: [],
} }
}, },
watch: { watch: {
baiduMapData(old, newV){
this.creatMap()
}
},created(){ },created(){
},mounted() { },mounted() {
let _this = this
this.bus.$on('addpoint',newArr=>{
//this.SourceData=newArr;
this.dataList = newArr
})
let map = new BMap.Map("centerMpBaidu");
},methods:{
creatMap(){
let map = new BMap.Map("centerMpBaidu");
map.setMapStyle({ map.setMapStyle({
style: 'midnight' style: 'midnight'
}); });
...@@ -53,8 +51,7 @@ export default { ...@@ -53,8 +51,7 @@ export default {
} }
//最简单的用法,生成一个marker数组,然后调用markerClusterer类即可。 //最简单的用法,生成一个marker数组,然后调用markerClusterer类即可。
var markerClusterer = new BMapLib.MarkerClusterer(map, {markers:markers}); var markerClusterer = new BMapLib.MarkerClusterer(map, {markers:markers});
},methods:{ }
} }
} }
</script> </script>
\ No newline at end of file
...@@ -44,8 +44,23 @@ export default { ...@@ -44,8 +44,23 @@ export default {
window.onresize = _this.myChart.resize; window.onresize = _this.myChart.resize;
this.myChart.on('click', function(params){ this.myChart.on('click', function(params){
console.log(params) console.log(params)
return let name = params.name
if (name === '非正式同行' || name === '正式同行' || name === '激活总数') {
// {location: `${params.data.value[0]}, ${params.data.value[1]}`, key: 'ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX'}
let url = encodeURIComponent(`http://api.map.baidu.com/geocoder?location=${params.data.value[1]},${params.data.value[0]}&output=json`)
_this.$http.get(`https://reborn.oytour.com/api/test/GetHtmlByUrl?urlStr=${url}`)
.then(res => {
let data = JSON.parse(res.data)
name = data.result.addressComponent.province
_this.bus.$emit('send-centerMpShow', name) _this.bus.$emit('send-centerMpShow', name)
})
.catch(err => {
console.log(err);
})
} else {
_this.bus.$emit('send-centerMpShow', name)
}
}); });
}, },
addPoint(newArr){ addPoint(newArr){
......
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
</div> </div>
<div class="map-box map-box-centerMpBaidu" v-if="!centerMpShow" style="position:relative;z-index:1;"> <div class="map-box map-box-centerMpBaidu" v-if="!centerMpShow" style="position:relative;z-index:1;">
<div class="map-box-centerMpBaidu-return" @click="centerMpShow = true, baiduMapData = []">返回</div> <div class="map-box-centerMpBaidu-return" @click="centerMpShow = true, baiduMapData = []">返回</div>
<centerMpBaidu :baiduMapData="baiduMapData" v-if="baiduMapData.length > 0"></centerMpBaidu> <centerMpBaidu :baiduMapData="baiduMapData" ></centerMpBaidu>
</div> </div>
<el-row class="tonghangshu"> <el-row class="tonghangshu">
<el-col :span="10"> <el-col :span="10">
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</div> </div>
</div> </div>
<div class="video_box" :class="movieShow ? 'video_box_show' : ''"> <div class="video_box" :class="movieShow ? 'video_box_show' : ''">
<video v-if="movieShow" @ended="nextVideo(true)" style="width:100%;height:100%;" ref="video" :src="movie[movieNum]" autoplay="autoplay" controls="controls">您的浏览器不支持视频播放</video> <video v-if="movieShow" @error="videoErr" @ended="nextVideo(true)" style="width:100%;height:100%;" ref="video" :src="movie[movieNum]" autoplay="autoplay" controls="controls">您的浏览器不支持视频播放</video>
</div> </div>
</div> </div>
</template> </template>
...@@ -194,10 +194,12 @@ export default { ...@@ -194,10 +194,12 @@ export default {
movieShow: false, movieShow: false,
movieTime: 0, movieTime: 0,
movieTimmer: null, movieTimmer: null,
fiveMinutes: 300, fiveMinutes: 1,
}; };
}, },
mounted() { mounted() {
let audio=this.$refs.audio
let _this=this
for (let i = 0; i < 26; i ++){ // 生成视频数据 for (let i = 0; i < 26; i ++){ // 生成视频数据
this.movie.push(`http://192.168.1.254/${i+1}.mp4`) this.movie.push(`http://192.168.1.254/${i+1}.mp4`)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`) // this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
...@@ -208,8 +210,6 @@ export default { ...@@ -208,8 +210,6 @@ export default {
this.bus.$on("addVideo", txt => { this.bus.$on("addVideo", txt => {
this.addVideo(txt); this.addVideo(txt);
}); });
let audio=this.$refs.audio
let _this=this
audio.addEventListener('ended', function () { audio.addEventListener('ended', function () {
console.log(_this.endVideo) console.log(_this.endVideo)
if(_this.endVideo&&_this.endVideo!=''){ if(_this.endVideo&&_this.endVideo!=''){
...@@ -232,6 +232,11 @@ export default { ...@@ -232,6 +232,11 @@ export default {
}, 1000); }, 1000);
}, },
methods: { methods: {
videoErr: function (){
this.movieShow = false
this.movieTime = 0
this.fiveMinutes = 9999
},
getMovieTimmer: function () { getMovieTimmer: function () {
if (this.movieTime < this.fiveMinutes) { if (this.movieTime < this.fiveMinutes) {
this.movieTime += 1 this.movieTime += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment