uniapp 微信小程序使用高德地图Vue3不兼容Vue2问题

news2024/11/16 15:35:53

1. uniapp 微信小程序使用高德地图Vue3不兼容Vue2问题

1.1. 问题

  uniapp Vue3项目引用高德地图报错
import amapPlugin from ‘…/…/…/js_sdk/js_amap/amap-wx.130’;

"default" is not exported by "../../../MyProject/Base/Szy/js_sdk/js_amap/amap-wx.130.js", imported by "../../../MyProject/Base/Szy/pages/template/pageAmapWx/pageAmapWx.vue".

在这里插入图片描述

1.2. 原因

  amap-wx库不支持es6 ES module模块导出,vue3不支持commonjs导入导出

1.3. 处理方案

1.3.1. 下载 微信小程序插件 amap-wx.130.js

下载 微信小程序插件 amap-wx.130.js

1.3.2. 修改 amap-wx.130.js 文件的尾部 module.exports.AMapWX=AMapWX; 修改为 export default { AMapWX };

// module.exports.AMapWX = AMapWX;
export default { AMapWX };

1.3.3. 修改后完整代码

function AMapWX(a) {
    this.key = a.key;
    this.requestConfig = {
        key: a.key,
        s: "rsx",
        platform: "WXJS",
        appname: a.key,
        sdkversion: "1.2.0",
        logversion: "2.0"
    };
    this.MeRequestConfig = {key: a.key, serviceName: "https://restapi.amap.com/rest/me"}
}

AMapWX.prototype.getWxLocation = function (a, b) {
    wx.getLocation({
        type: "gcj02", success: function (c) {
            c = c.longitude + "," + c.latitude;
            wx.setStorage({key: "userLocation", data: c});
            b(c)
        }, fail: function (c) {
            wx.getStorage({
                key: "userLocation", success: function (d) {
                    d.data && b(d.data)
                }
            });
            a.fail({errCode: "0", errMsg: c.errMsg || ""})
        }
    })
};
AMapWX.prototype.getMEKeywordsSearch = function (a) {
    if (!a.options) return a.fail({errCode: "0", errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});
    var b = a.options, c = this.MeRequestConfig,
        d = {key: c.key, s: "rsx", platform: "WXJS", appname: a.key, sdkversion: "1.2.0", logversion: "2.0"};
    b.layerId && (d.layerId = b.layerId);
    b.keywords && (d.keywords = b.keywords);
    b.city && (d.city = b.city);
    b.filter && (d.filter = b.filter);
    b.sortrule && (d.sortrule = b.sortrule);
    b.pageNum && (d.pageNum = b.pageNum);
    b.pageSize && (d.pageSize = b.pageSize);
    b.sig && (d.sig =
        b.sig);
    wx.request({
        url: c.serviceName + "/cpoint/datasearch/local",
        data: d,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (e) {
            (e = e.data) && e.status && "1" === e.status && 0 === e.code ? a.success(e.data) : a.fail({
                errCode: "0",
                errMsg: e
            })
        },
        fail: function (e) {
            a.fail({errCode: "0", errMsg: e.errMsg || ""})
        }
    })
};
AMapWX.prototype.getMEIdSearch = function (a) {
    if (!a.options) return a.fail({errCode: "0", errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});
    var b = a.options, c = this.MeRequestConfig,
        d = {key: c.key, s: "rsx", platform: "WXJS", appname: a.key, sdkversion: "1.2.0", logversion: "2.0"};
    b.layerId && (d.layerId = b.layerId);
    b.id && (d.id = b.id);
    b.sig && (d.sig = b.sig);
    wx.request({
        url: c.serviceName + "/cpoint/datasearch/id",
        data: d,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (e) {
            (e = e.data) && e.status && "1" === e.status &&
            0 === e.code ? a.success(e.data) : a.fail({errCode: "0", errMsg: e})
        },
        fail: function (e) {
            a.fail({errCode: "0", errMsg: e.errMsg || ""})
        }
    })
};
AMapWX.prototype.getMEPolygonSearch = function (a) {
    if (!a.options) return a.fail({errCode: "0", errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});
    var b = a.options, c = this.MeRequestConfig,
        d = {key: c.key, s: "rsx", platform: "WXJS", appname: a.key, sdkversion: "1.2.0", logversion: "2.0"};
    b.layerId && (d.layerId = b.layerId);
    b.keywords && (d.keywords = b.keywords);
    b.polygon && (d.polygon = b.polygon);
    b.filter && (d.filter = b.filter);
    b.sortrule && (d.sortrule = b.sortrule);
    b.pageNum && (d.pageNum = b.pageNum);
    b.pageSize && (d.pageSize = b.pageSize);
    b.sig && (d.sig = b.sig);
    wx.request({
        url: c.serviceName + "/cpoint/datasearch/polygon",
        data: d,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (e) {
            (e = e.data) && e.status && "1" === e.status && 0 === e.code ? a.success(e.data) : a.fail({
                errCode: "0",
                errMsg: e
            })
        },
        fail: function (e) {
            a.fail({errCode: "0", errMsg: e.errMsg || ""})
        }
    })
};
AMapWX.prototype.getMEaroundSearch = function (a) {
    if (!a.options) return a.fail({errCode: "0", errMsg: "\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});
    var b = a.options, c = this.MeRequestConfig,
        d = {key: c.key, s: "rsx", platform: "WXJS", appname: a.key, sdkversion: "1.2.0", logversion: "2.0"};
    b.layerId && (d.layerId = b.layerId);
    b.keywords && (d.keywords = b.keywords);
    b.center && (d.center = b.center);
    b.radius && (d.radius = b.radius);
    b.filter && (d.filter = b.filter);
    b.sortrule && (d.sortrule = b.sortrule);
    b.pageNum && (d.pageNum = b.pageNum);
    b.pageSize &&
    (d.pageSize = b.pageSize);
    b.sig && (d.sig = b.sig);
    wx.request({
        url: c.serviceName + "/cpoint/datasearch/around",
        data: d,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (e) {
            (e = e.data) && e.status && "1" === e.status && 0 === e.code ? a.success(e.data) : a.fail({
                errCode: "0",
                errMsg: e
            })
        },
        fail: function (e) {
            a.fail({errCode: "0", errMsg: e.errMsg || ""})
        }
    })
};
AMapWX.prototype.getGeo = function (a) {
    var b = this.requestConfig, c = a.options;
    b = {
        key: this.key,
        extensions: "all",
        s: b.s,
        platform: b.platform,
        appname: this.key,
        sdkversion: b.sdkversion,
        logversion: b.logversion
    };
    c.address && (b.address = c.address);
    c.city && (b.city = c.city);
    c.batch && (b.batch = c.batch);
    c.sig && (b.sig = c.sig);
    wx.request({
        url: "https://restapi.amap.com/v3/geocode/geo",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (d) {
            (d = d.data) && d.status && "1" === d.status ? a.success(d) : a.fail({
                errCode: "0",
                errMsg: d
            })
        },
        fail: function (d) {
            a.fail({errCode: "0", errMsg: d.errMsg || ""})
        }
    })
};
AMapWX.prototype.getRegeo = function (a) {
    function b(d) {
        var e = c.requestConfig;
        wx.request({
            url: "https://restapi.amap.com/v3/geocode/regeo",
            data: {
                key: c.key,
                location: d,
                extensions: "all",
                s: e.s,
                platform: e.platform,
                appname: c.key,
                sdkversion: e.sdkversion,
                logversion: e.logversion
            },
            method: "GET",
            header: {"content-type": "application/json"},
            success: function (g) {
                if (g.data.status && "1" == g.data.status) {
                    g = g.data.regeocode;
                    var h = g.addressComponent, f = [], k = g.roads[0].name + "\u9644\u8fd1", m = d.split(",")[0],
                        n = d.split(",")[1];
                    if (g.pois &&
                        g.pois[0]) {
                        k = g.pois[0].name + "\u9644\u8fd1";
                        var l = g.pois[0].location;
                        l && (m = parseFloat(l.split(",")[0]), n = parseFloat(l.split(",")[1]))
                    }
                    h.provice && f.push(h.provice);
                    h.city && f.push(h.city);
                    h.district && f.push(h.district);
                    h.streetNumber && h.streetNumber.street && h.streetNumber.number ? (f.push(h.streetNumber.street), f.push(h.streetNumber.number)) : f.push(g.roads[0].name);
                    f = f.join("");
                    a.success([{
                        iconPath: a.iconPath,
                        width: a.iconWidth,
                        height: a.iconHeight,
                        name: f,
                        desc: k,
                        longitude: m,
                        latitude: n,
                        id: 0,
                        regeocodeData: g
                    }])
                } else a.fail({
                    errCode: g.data.infocode,
                    errMsg: g.data.info
                })
            },
            fail: function (g) {
                a.fail({errCode: "0", errMsg: g.errMsg || ""})
            }
        })
    }

    var c = this;
    a.location ? b(a.location) : c.getWxLocation(a, function (d) {
        b(d)
    })
};
AMapWX.prototype.getWeather = function (a) {
    function b(g) {
        var h = "base";
        a.type && "forecast" == a.type && (h = "all");
        wx.request({
            url: "https://restapi.amap.com/v3/weather/weatherInfo",
            data: {
                key: d.key,
                city: g,
                extensions: h,
                s: e.s,
                platform: e.platform,
                appname: d.key,
                sdkversion: e.sdkversion,
                logversion: e.logversion
            },
            method: "GET",
            header: {"content-type": "application/json"},
            success: function (f) {
                if (f.data.status && "1" == f.data.status) if (f.data.lives) {
                    if ((f = f.data.lives) && 0 < f.length) {
                        f = f[0];
                        var k = {
                            city: {text: "\u57ce\u5e02", data: f.city},
                            weather: {text: "\u5929\u6c14", data: f.weather},
                            temperature: {text: "\u6e29\u5ea6", data: f.temperature},
                            winddirection: {text: "\u98ce\u5411", data: f.winddirection + "\u98ce"},
                            windpower: {text: "\u98ce\u529b", data: f.windpower + "\u7ea7"},
                            humidity: {text: "\u6e7f\u5ea6", data: f.humidity + "%"}
                        };
                        k.liveData = f;
                        a.success(k)
                    }
                } else f.data.forecasts && f.data.forecasts[0] && a.success({forecast: f.data.forecasts[0]}); else a.fail({
                    errCode: f.data.infocode,
                    errMsg: f.data.info
                })
            },
            fail: function (f) {
                a.fail({errCode: "0", errMsg: f.errMsg || ""})
            }
        })
    }

    function c(g) {
        wx.request({
            url: "https://restapi.amap.com/v3/geocode/regeo",
            data: {
                key: d.key,
                location: g,
                extensions: "all",
                s: e.s,
                platform: e.platform,
                appname: d.key,
                sdkversion: e.sdkversion,
                logversion: e.logversion
            },
            method: "GET",
            header: {"content-type": "application/json"},
            success: function (h) {
                if (h.data.status && "1" == h.data.status) {
                    h = h.data.regeocode;
                    if (h.addressComponent) var f = h.addressComponent.adcode; else h.aois && 0 < h.aois.length && (f = h.aois[0].adcode);
                    b(f)
                } else a.fail({errCode: h.data.infocode, errMsg: h.data.info})
            },
            fail: function (h) {
                a.fail({errCode: "0", errMsg: h.errMsg || ""})
            }
        })
    }

    var d = this, e = d.requestConfig;
    a.city ? b(a.city) : d.getWxLocation(a, function (g) {
        c(g)
    })
};
AMapWX.prototype.getPoiAround = function (a) {
    function b(e) {
        e = {
            key: c.key,
            location: e,
            s: d.s,
            platform: d.platform,
            appname: c.key,
            sdkversion: d.sdkversion,
            logversion: d.logversion
        };
        a.querytypes && (e.types = a.querytypes);
        a.querykeywords && (e.keywords = a.querykeywords);
        wx.request({
            url: "https://restapi.amap.com/v3/place/around",
            data: e,
            method: "GET",
            header: {"content-type": "application/json"},
            success: function (g) {
                if (g.data.status && "1" == g.data.status) {
                    if ((g = g.data) && g.pois) {
                        for (var h = [], f = 0; f < g.pois.length; f++) {
                            var k = 0 ==
                            f ? a.iconPathSelected : a.iconPath;
                            h.push({
                                latitude: parseFloat(g.pois[f].location.split(",")[1]),
                                longitude: parseFloat(g.pois[f].location.split(",")[0]),
                                iconPath: k,
                                width: 22,
                                height: 32,
                                id: f,
                                name: g.pois[f].name,
                                address: g.pois[f].address
                            })
                        }
                        a.success({markers: h, poisData: g.pois})
                    }
                } else a.fail({errCode: g.data.infocode, errMsg: g.data.info})
            },
            fail: function (g) {
                a.fail({errCode: "0", errMsg: g.errMsg || ""})
            }
        })
    }

    var c = this, d = c.requestConfig;
    a.location ? b(a.location) : c.getWxLocation(a, function (e) {
        b(e)
    })
};
AMapWX.prototype.getStaticmap = function (a) {
    function b(e) {
        c.push("location=" + e);
        a.zoom && c.push("zoom=" + a.zoom);
        a.size && c.push("size=" + a.size);
        a.scale && c.push("scale=" + a.scale);
        a.markers && c.push("markers=" + a.markers);
        a.labels && c.push("labels=" + a.labels);
        a.paths && c.push("paths=" + a.paths);
        a.traffic && c.push("traffic=" + a.traffic);
        e = "https://restapi.amap.com/v3/staticmap?" + c.join("&");
        a.success({url: e})
    }

    var c = [];
    c.push("key=" + this.key);
    var d = this.requestConfig;
    c.push("s=" + d.s);
    c.push("platform=" + d.platform);
    c.push("appname=" + d.appname);
    c.push("sdkversion=" + d.sdkversion);
    c.push("logversion=" + d.logversion);
    a.location ? b(a.location) : this.getWxLocation(a, function (e) {
        b(e)
    })
};
AMapWX.prototype.getInputtips = function (a) {
    var b = Object.assign({}, this.requestConfig);
    a.location && (b.location = a.location);
    a.keywords && (b.keywords = a.keywords);
    a.type && (b.type = a.type);
    a.city && (b.city = a.city);
    a.citylimit && (b.citylimit = a.citylimit);
    wx.request({
        url: "https://restapi.amap.com/v3/assistant/inputtips",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (c) {
            c && c.data && c.data.tips && a.success({tips: c.data.tips})
        },
        fail: function (c) {
            a.fail({
                errCode: "0", errMsg: c.errMsg ||
                    ""
            })
        }
    })
};
AMapWX.prototype.getDrivingRoute = function (a) {
    var b = Object.assign({}, this.requestConfig);
    a.origin && (b.origin = a.origin);
    a.destination && (b.destination = a.destination);
    a.strategy && (b.strategy = a.strategy);
    a.waypoints && (b.waypoints = a.waypoints);
    a.avoidpolygons && (b.avoidpolygons = a.avoidpolygons);
    a.avoidroad && (b.avoidroad = a.avoidroad);
    wx.request({
        url: "https://restapi.amap.com/v3/direction/driving",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (c) {
            c && c.data && c.data.route && a.success({
                paths: c.data.route.paths,
                taxi_cost: c.data.route.taxi_cost || ""
            })
        },
        fail: function (c) {
            a.fail({errCode: "0", errMsg: c.errMsg || ""})
        }
    })
};
AMapWX.prototype.getWalkingRoute = function (a) {
    var b = Object.assign({}, this.requestConfig);
    a.origin && (b.origin = a.origin);
    a.destination && (b.destination = a.destination);
    wx.request({
        url: "https://restapi.amap.com/v3/direction/walking",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (c) {
            c && c.data && c.data.route && a.success({paths: c.data.route.paths})
        },
        fail: function (c) {
            a.fail({errCode: "0", errMsg: c.errMsg || ""})
        }
    })
};
AMapWX.prototype.getTransitRoute = function (a) {
    var b = Object.assign({}, this.requestConfig);
    a.origin && (b.origin = a.origin);
    a.destination && (b.destination = a.destination);
    a.strategy && (b.strategy = a.strategy);
    a.city && (b.city = a.city);
    a.cityd && (b.cityd = a.cityd);
    wx.request({
        url: "https://restapi.amap.com/v3/direction/transit/integrated",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (c) {
            c && c.data && c.data.route && (c = c.data.route, a.success({
                distance: c.distance || "", taxi_cost: c.taxi_cost ||
                    "", transits: c.transits
            }))
        },
        fail: function (c) {
            a.fail({errCode: "0", errMsg: c.errMsg || ""})
        }
    })
};
AMapWX.prototype.getRidingRoute = function (a) {
    var b = Object.assign({}, this.requestConfig);
    a.origin && (b.origin = a.origin);
    a.destination && (b.destination = a.destination);
    wx.request({
        url: "https://restapi.amap.com/v3/direction/riding",
        data: b,
        method: "GET",
        header: {"content-type": "application/json"},
        success: function (c) {
            c && c.data && c.data.route && a.success({paths: c.data.route.paths})
        },
        fail: function (c) {
            a.fail({errCode: "0", errMsg: c.errMsg || ""})
        }
    })
};
// module.exports.AMapWX = AMapWX;
export default { AMapWX };

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1476776.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

springboot+vue网站开发-后端管理框架-vue-admin-template

为了方便国内用户下载&#xff0c;我把自己的百度网盘分享给大家一份地址&#xff0c;可以去下载。 如果你有上网盒子软件&#xff0c;那就自己去下载&#xff0c;很小。不到1MB. 链接&#xff1a;https://pan.baidu.com/s/15LJ2MoSWToFGFp28VaxBeQ?pwdbaby 提取码&#xff…

C++之queue和dqueue

1、queue queue&#xff08;队列&#xff09;&#xff0c;一种数据结构&#xff0c;可以让某些数据结构的操作变得简单。队列&#xff08;queue&#xff09;最大的特点就是先进先出。就是说先放入queue容器的元素一定是要先出队列之后&#xff0c;比它后进入队列的元素才能够出…

【MATLAB源码-第150期】基于matlab的开普勒优化算法(KOA)机器人栅格路径规划,输出做短路径图和适应度曲线。

操作环境&#xff1a; MATLAB 2022a 1、算法描述 开普勒优化算法&#xff08;Kepler Optimization Algorithm, KOA&#xff09;是一个虚构的、灵感来自天文学的优化算法&#xff0c;它借鉴了开普勒行星运动定律的概念来设计。在这个构想中&#xff0c;算法模仿行星围绕太阳的…

图论(算法竞赛、蓝桥杯)--Dijkstra算法最短路

1、B站视频链接&#xff1a;D02 最短路 Dijkstra 算法_哔哩哔哩_bilibili 题目链接&#xff1a;【模板】单源最短路径&#xff08;弱化版&#xff09; - 洛谷 #include <bits/stdc.h> using namespace std; #define INF 2147483647 int n,m,s,a,b,c; const int N100010…

Spring Boot项目中如何上传头像?

在我们常见的各大App中&#xff0c;或多或少我们都见过上传头像的功能吧&#xff1f;&#xff1f; 但是在Spring Boot项目中如何上传头像呢&#xff1f; 上传头像主要用到RequestPart注解 来看一下小编的代码吧&#xff01; RestController RequestMapping("/param"…

ONLYOFFICE桌面编辑器v8.0完整指南:安装、特点与新增功能

文章目录 摘要引言安装主界面可填写的 PDF 表单双向文本支持电子表格中的新增功能其他改进与Moodle集成用密码保护PDF文件从“开始”菜单快速创建文档本地界面主题安装免费的 ONLYOFFICE桌面编辑器 总结 摘要 本文介绍了ONLYOFFICE桌面编辑器v8.0的安装、主界面特点以及新增功…

R语言实现分位数回归和二次分位数回归

大家好&#xff0c;我是带我去滑雪&#xff01;新的一年&#xff0c;新的气象&#xff0c;在接下来的日子里我将继续和各位小伙伴们分享我在科研道路上&#xff0c;学习的一些知识&#xff01; 分位数回归和二次分位数回归是统计学中用于分析因变量与自变量之间关系的方法&…

【InternLM 实战营笔记】浦语大模型趣味 Demo

大模型及 InternLM 模型简介 1.1 什么是大模型&#xff1f; 大模型通常指的是机器学习或人工智能领域中参数数量巨大、拥有庞大计算能力和参数规模的模型。这些模型利用大量数据进行训练&#xff0c;并且拥有数十亿甚至数千亿个参数。大模型的出现和发展得益于增长的数据量、…

s-table和columns初始化不完整,造成table文件的filter报错

问题 顺藤摸瓜找errorHandler.js文件 发现文件并没有什么问题 顺藤摸瓜找index.vue文件 首先找到报错的filter&#xff0c;发现与columnsSetting相关 找到columnsSetting发现等于columns 返回自己使用S-table组件的地方&#xff0c;发现columns初始化时仅初始化为ref()未表明…

微信小程序证书评级导致接口无法访问问题

微信小程序的ssl证书到期后&#xff0c; 更换了免费的ssl证书&#xff0c; 是在freessl网站申请的&#xff0c; 配置完了&#xff0c;后台可以访问https网页&#xff0c;但是小程序还是无法访问&#xff0c; 开始没有怀疑是https证书的问题&#xff0c; 调适了好长时间的代码&a…

揭示IP风险画像的作用与价值

在当今数字化时代&#xff0c;互联网的快速发展为企业和个人带来了巨大的机遇&#xff0c;同时也带来了各种安全风险和威胁。随着网络攻击手段的不断升级和演变&#xff0c;传统的安全防御手段已经无法满足对抗复杂多变的网络威胁的需求。IP风险画像作为一种新型的网络安全解决…

45、WEB攻防——通用漏洞PHP反序列化POP链构造魔术方法原生类

文章目录 序列化&#xff1a;将java、php等代码中的对象转化为数组或字符串等格式。代表函数serialize()&#xff0c;将一个对象转换成一个字符&#xff1b;反序列化&#xff1a;将数组或字符串等格式还成对象。代表函数unserialize()&#xff0c;将字符串还原成一个对象。 P…

亚马逊自养号测评:如何安全搭建环境,有效规避风险

要在亚马逊上进行自养号测评&#xff0c;构建一个真实的国外环境至关重要。这包括模拟国外的服务器、IP地址、浏览器环境&#xff0c;甚至支付方式&#xff0c;以创建一个完整的国际操作环境。这样的环境能让我们自由注册、养号并下单&#xff0c;确保所有操作均符合国际规范。…

【MySQL】MySQL5.7版本安装与配置

目录 官网下载配置环境变量添加自定义配置打开命令窗口执行安装命令执行初始化命令启动MySQL服务设置MySQL密码 官网 MySQ官网地址&#xff1a;https://www.mysql.com/ 下载 选择DOWNLOADS 拉到下面 选择MySQL Community Server 默认是8.0版本&#xff0c;选择Archives…

【论文阅读】Usenix Security 2023 你看不见我:对基于激光雷达的自动驾驶汽车驾驶框架的物理移除攻击

文章目录 一.论文信息二.论文内容1.摘要2.引言3.作者贡献4.主要图表5.结论 一.论文信息 论文题目&#xff1a; You Can’t See Me: Physical Removal Attacks on LiDAR-based Autonomous Vehicles Driving Frameworks&#xff08;你看不见我:对基于激光雷达的自动驾驶汽车驾驶…

重拾前端基础知识:JavaScript

重拾前端基础知识&#xff1a;JavaScript 前言使用JavaScript输出语法运算符条件语句循环数据类型字符串数字数组对象日期函数 数学正则表达式异常处理类集合模块JSON闭包异步调试DOM&#xff08;文档对象模型&#xff09;事件事件监听器表单 BOM&#xff08;浏览器对象模型&am…

嵌入式烧录报错:板端IP与PC的IP相同

报错&#xff1a; 配置 实际上我配置并没有错。 服务器IP&#xff08;就是本机&#xff09;、板端IP、网关。此处网关必须与板子IP配套&#xff08;可以不存在&#xff09;。 解决 我网卡配置了多个IP。一番删除添加还是报错。 于是点击服务器IP&#xff0c;换成别的&#x…

【Go语言】Go语言中的字典

Go语言中的字典 字典就是存储键值对映射关系的集合&#xff0c;在Go语言中&#xff0c;需要在声明时指定键和值的类型&#xff0c;此外Go语言中的字典是个无序集合&#xff0c;底层不会按照元素添加顺序维护元素的存储顺序。 如下所示&#xff0c;Go语言中字典的简单示例&…

【Unity】导入IAP插件后依赖冲突问题 com.android.billingclient冲突

【Unity】Attribute meta-data#com.google.android.play.billingclient.version 多版本库冲突_unity billingclient-CSDN博客 打开mainTemplate.gradle 找到dependencies { } 在里面末尾加上如下&#xff1a; configurations.all {exclude group: com.android.billingclien…

起飞咯,DEYO | YOLOv8赋能DETR构建检测达成检测新标杆

本文首发:AIWalker https://arxiv.org/abs/2402.16370 https://github.com/ouyanghaodong/DEYO 内容摘要 DETR的训练范式在很大程度上取决于在ImageNet数据集上预训练其骨干。然而&#xff0c;由图像分类任务和一对一匹配策略提供的有限监督信号导致DETR的预训练不充分的颈部。…