@@ -58,7 +58,6 @@ module.exports = async (util) => {
`https://geo.datav.aliyun.com/areas_v3/bound/geojson?code=520600_full`
)
.then((res) => res.data)
- console.log(`data`, data)
res.json(
wrapApiData(
util.libObj.mockjs.mock({
@@ -50,9 +50,6 @@ export default {
type: String,
default: ``,
},
- key: {
- type: Object,
- },
titleEn: {
default: `Tongren Tobacco Planting Digital Management Platform`,
@@ -62,8 +59,12 @@ export default {
this.getEchart()
watch: {
- data() {
- this.getEchart()
+ data: {
+ handler(newVal) {
+ this.getEchart()
+ },
+ deep: true, // 深度监听
+ immediate: true, // 立即执行
methods: {
@@ -73,7 +73,6 @@ export default {
formatter: function (params) {
- console.log(params, `111111`)
return [params[0].value].join(`<br>`)
@@ -319,8 +319,9 @@ export default {
async getJSON() {
console.log(`获取JSOn`)
- this.getJson = await this.$http.get(`/api/mapOfTongren`)
- console.log(this.getJson)
+ this.getJson = await this.$http.get(
+ `/datav/areas_v3/bound/geojson?code=520600_full`
+ )
this.hasGetJson = true