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

perf:no cdn

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