提交 0d13cde2 编写于 作者: yma16's avatar yma16

perf:no cdn

上级 b8a42265
......@@ -80,7 +80,7 @@
<!-- >&nbsp;&nbsp;在线聊天室</i-->
<!-- >-->
<div style="float: right; overflow: hidden;display: flex;justify-items: center;align-items:center;word-spacing: 16px;">
<span style="cursor: pointer; width: 80px" v-if="currentUserName">
<span style="cursor: pointer;padding-right: 50px" v-if="currentUserName">
<el-popover
trigger="click">
<span @click="loginOut" style="cursor: pointer; height: 16px">注销</span>
......
......@@ -98,17 +98,14 @@ export default {
this.initOptionData()
},
initOptionData: function () {
const echarts = this.$echarts
if (!echarts) return
let that = this
// const echarts = this.$echarts
// if (!echarts) return
const that = this
// 置空
that.linesCoord = []
function task1 () {
let that = this
async function task1 () {
return new Promise((resolve) => {
setTimeout(() => {
console.log('第1个任务geojson获取')
this.$axios
that.$axios
.get('https://yongma16.xyz/static/json/map/guizhou.json')
.then(function (response) {
let res = response.data
......@@ -151,18 +148,15 @@ export default {
}
console.log('测试热力处理', that.airData)
echarts.registerMap('geoJson', res)
})
resolve('第一个任务')
}, 1000)
}).catch((error) => {
throw Error(error)
}).catch(r => {
resolve(r)
})
})
}
function task2 () {
async function task2 () {
return new Promise((resolve) => {
setTimeout(() => {
console.log('第2个任务option配置')
that.option = {
title: {
text: '贵州省地图',
......@@ -259,8 +253,7 @@ export default {
calculable: false // 出现滑块
}
}
resolve('2')
}, 1000)
resolve('echarts options')
})
}
async function allTasks () {
......@@ -274,7 +267,7 @@ export default {
})
},
initMapGis: function (optionParams) {
let that = this
const that = this
try {
// 基于准备好的dom,初始化echarts实例
console.log('echarts_map渲染')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册