vue接入google map自定义marker教程

news2024/11/17 4:35:45

需求背景

由于客户需求,原来系统接入的高德地图,他们不接受,需要换成google地图。然后就各种百度,各种Google,却不能实现。----无语,就连google地图官方的api也是一坨S-H-I。所以才出现这篇文章。

google地图官方API

-- 以下是Google官方的marker教程,你要是当真就完蛋了。

https://developers.google.cn/maps/documentation/javascript/examples/advanced-markers-accessibility#maps_advanced_markers_accessibility-javascript

效果图

教程描述

本教程是使用的vue2+index直接引入js的方式实现,由于网上没有找到合适的插件,都以失败告终。该教程是用户点击marker的时候,才会请求后台接口,弹出自定义弹窗的内容。适合多地图标点使用。

-- 无法安装
-- 结果失败告终
npm install @googlemaps/js-api-loader

-- 无法安装
-- 结果失败告终
npm install vue-google-maps

-- 打开梯子工具,可以安装,可以展示地图,不能实现动态marker,也可能是我技术不行
-- 结果失败告终
npm install vue2-google-maps@0.10.7
-- 感兴趣的可以参考下面的文章
https://blog.csdn.net/weixin_51678651/article/details/132237438

-- 没有尝试,感兴趣的可以试试
npm install google-maps
-- 感兴趣的可以参考下面的文章
https://juejin.cn/post/6844904045245644808?from=search-suggest

-- 不想浪费时间的直接看我的教程

教程开始

1、爬楼梯工具

需要爬楼梯工具,不然啥都白费。

2、免费google map api key

// 下面的key只能用于开发,不然地图上满屏都是For development purposes only水印
key=AIzaSyBzE9xAESye6Kde-3hT-6B90nfwUkcS8Yw

3、index.html

修改public\index.html文件,在title标签的下面增加js

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <!-- 在这里增加自己的子目录名称 -->
    <meta base="/aiot/">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <link rel="icon" href="<%= BASE_URL %>logo.ico">
    <title><%= webpackConfig.name %></title>
    
    <!-- 在这里引入google map -->
    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBzE9xAESye6Kde-3hT-6B90nfwUkcS8Yw&v=weekly" defer></script>
    <!-- 在这里引入google map -->

    <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
	  <style>
    html,
    body,
    #app {
      height: 100%;
      margin: 0px;
      padding: 0px;
    }
    .chromeframe {
      margin: 0.2em 0;
      background: #ccc;
      color: #000;
      padding: 0.2em 0;
    }

    #loader-wrapper {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 999999;
    }

    #loader {
      display: block;
      position: relative;
      left: 50%;
      top: 50%;
      width: 150px;
      height: 150px;
      margin: -75px 0 0 -75px;
      border-radius: 50%;
      border: 3px solid transparent;
      border-top-color: #FFF;
      -webkit-animation: spin 2s linear infinite;
      -ms-animation: spin 2s linear infinite;
      -moz-animation: spin 2s linear infinite;
      -o-animation: spin 2s linear infinite;
      animation: spin 2s linear infinite;
      z-index: 1001;
    }

    #loader:before {
      content: "";
      position: absolute;
      top: 5px;
      left: 5px;
      right: 5px;
      bottom: 5px;
      border-radius: 50%;
      border: 3px solid transparent;
      border-top-color: #FFF;
      -webkit-animation: spin 3s linear infinite;
      -moz-animation: spin 3s linear infinite;
      -o-animation: spin 3s linear infinite;
      -ms-animation: spin 3s linear infinite;
      animation: spin 3s linear infinite;
    }

    #loader:after {
      content: "";
      position: absolute;
      top: 15px;
      left: 15px;
      right: 15px;
      bottom: 15px;
      border-radius: 50%;
      border: 3px solid transparent;
      border-top-color: #FFF;
      -moz-animation: spin 1.5s linear infinite;
      -o-animation: spin 1.5s linear infinite;
      -ms-animation: spin 1.5s linear infinite;
      -webkit-animation: spin 1.5s linear infinite;
      animation: spin 1.5s linear infinite;
    }


    @-webkit-keyframes spin {
      0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
      }
      100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }

    @keyframes spin {
      0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
      }
      100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
      }
    }


    #loader-wrapper .loader-section {
      position: fixed;
      top: 0;
      width: 51%;
      height: 100%;
      background: #304156;
      z-index: 1000;
      -webkit-transform: translateX(0);
      -ms-transform: translateX(0);
      transform: translateX(0);
    }

    #loader-wrapper .loader-section.section-left {
      left: 0;
    }

    #loader-wrapper .loader-section.section-right {
      right: 0;
    }


    .loaded #loader-wrapper .loader-section.section-left {
      -webkit-transform: translateX(-100%);
      -ms-transform: translateX(-100%);
      transform: translateX(-100%);
      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    }

    .loaded #loader-wrapper .loader-section.section-right {
      -webkit-transform: translateX(100%);
      -ms-transform: translateX(100%);
      transform: translateX(100%);
      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    }

    .loaded #loader {
      opacity: 0;
      -webkit-transition: all 0.3s ease-out;
      transition: all 0.3s ease-out;
    }

    .loaded #loader-wrapper {
      visibility: hidden;
      -webkit-transform: translateY(-100%);
      -ms-transform: translateY(-100%);
      transform: translateY(-100%);
      -webkit-transition: all 0.3s 1s ease-out;
      transition: all 0.3s 1s ease-out;
    }

    .no-js #loader-wrapper {
      display: none;
    }

    .no-js h1 {
      color: #222222;
    }

    #loader-wrapper .load_title {
      font-family: 'Open Sans';
      color: #FFF;
      font-size: 19px;
      width: 100%;
      text-align: center;
      z-index: 9999999999999;
      position: absolute;
      top: 60%;
      opacity: 1;
      line-height: 30px;
    }

    #loader-wrapper .load_title span {
      font-weight: normal;
      font-style: italic;
      font-size: 13px;
      color: #FFF;
      opacity: 0.5;
    }

  </style>
  </head>
  <body>
    <div id="app">
	    <div id="loader-wrapper">
		    <div id="loader"></div>
		    <div id="bgLeft" class="loader-section section-left"></div>
		    <div id="bgRight" class="loader-section section-right"></div>
		    <!-- <div class="load_title">正在加载系统资源,请耐心等待</div> -->
        </div>
	</div>
  <script>
    const bgLeft = document.getElementById('bgLeft');
    const bgRight = document.getElementById('bgRight');
    let backgroundColor = "#304156";
    if (window.innerWidth < 1500) {
      // 移动端
      backgroundColor = "#91dbcd";
    }
    
    bgLeft.style.backgroundColor = backgroundColor;
    bgRight.style.backgroundColor = backgroundColor;
  </script>
  </body>
</html>

4、vue代码

<template>
  <div class="app-container" style="padding-bottom: 0;">
    <el-row>
      <el-col :span="24">
        <div id="mapDiv" ref="mapDiv"></div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import request from '@/utils/request';

export default {
  name: "IndexGoogleMap",
  data() {
    return {
      map:null,
      googleCenter: { lat: 24.919900, lng: 121.2140 },
      googleZoom:5,
      googleMarkers:[],
      googleInfoWindow: null,
      queryParams: {
        id: 0,
        name: ""
      },
    };
  },
  created() {
  },
  methods: {
    initMap() {
      let _this = this;
      request({
        url: '/index/listMap',
        method: 'get',
        params: this.queryParams
      }).then(response => {
          if(response != null && response.rows != null){
            _this.map = new window.google.maps.Map(document.getElementById("mapDiv"), {
                zoom: _this.googleZoom,
                center: _this.googleCenter,
                mapTypeControl: false, // 是否显示地图类型切换的按钮 默认 true
                fullscreenControl:false, // 是否显示全屏显示地图的按钮 默认 true
                streetViewControl: false, // 是否显示街景按钮 默认 true
            });
            _this.googleInfoWindow = new google.maps.InfoWindow();
            for (let i = 0; i < response.rows.length; i++) {
              let pngColorName = "map_pink_26";
              if(response.rows[i].onlineFlag == 0){
                pngColorName = "map_gree_26";
              }
              let pngColorPath = require("../assets/images/"+pngColorName+".png");
              var position = new google.maps.LatLng(response.rows[i].latitude, response.rows[i].longitude);
              let marker = new google.maps.Marker({
                position: position, // 标记的位置
                map: _this.map, // 标记所在的地图
                icon: pngColorPath, // 标记的icon
              });
              let id = response.rows[i].id;
              google.maps.event.addListener(marker, 'click', function(evt) {
                request({
                  url: '/index/getIndexDeviceInfoByOne?id='+id,
                  method: 'get'
                }).then(response => {
                    if(response != null && response.data != null){
                      if(_this.googleInfoWindow != null){
                        _this.googleInfoWindow.close();
                      }
                      let onlineStatus = "离线";
                      if(response.data.online == 0){
                        onlineStatus = "在线";
                      }
                      let deviceStatus = "故障";
                      if(response.data.devStatus == 0){
                        deviceStatus = "正常";
                      }
                      let deviceContent = "<div class=\"map_div_css\">";
                      deviceContent += "<div style=\"border-bottom:1px solid #ffffff; margin-bottom: 5px;\">设备信息</div>";
                      deviceContent += "<div>所属公司:"+response.data.companyName+"</div>";
                      deviceContent += "<div>设备标识:"+response.data.devId+"</div>";
                      deviceContent += "<div>设备名称:"+response.data.name+"</div>";
                      deviceContent += "<div>在线状态:"+onlineStatus+"</div>";
                      deviceContent += "<div>设备状态:"+deviceStatus+"</div>";
                      deviceContent += "</div>";
                      _this.googleInfoWindow.setContent(deviceContent);
                      _this.googleInfoWindow.open(_this.map, marker);
                    }
                  }
                );
              });
            }
          }
        }
      );


      
    },
  },
  mounted() {
    this.initMap();
  },
};


</script>

<style scoped lang="scss">

  #mapDiv {
    padding: 0px;
    margin: 0px;
    width: 100%;
    height: 48vh;
  }
  ::v-deep .map_div_css{
    background: #304156;
    padding: 7px;
    font-size: 14px;
    color: #ffffff;
    border-radius: 6px;
    font-family: initial;
  }
  ::v-deep .gm-style .gm-style-iw-c{
    background-color: #304156;
    padding: 0px;
    box-shadow: 0;
    border: 1px solid #46515f;
  }
  ::v-deep .gm-style .gm-style-iw-tc::after{
    background: #304156;
  }
  ::v-deep .gm-ui-hover-effect {
    opacity: 1;
    width: 38px !important;
    height: 38px !important;
  }
  ::v-deep .gm-ui-hover-effect span{
    margin: 0px 0px 0px 3px !important;
    background-color: #fff;
  }
  ::v-deep .gm-style-iw-d{
    overflow: hidden !important;
  }
  ::v-deep .gm-style-iw-ch{
    padding-top: 0px;
  }
  
</style>

结束

-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

-----华丽的分割线,以下是凑字数,大家不用花时间看,快去改代码-----

 

package cn.renkai721.bean.vo;
 
import lombok.extern.slf4j.Slf4j;
 
@Slf4j
public class MakeUpTheWordCount {
 
    private String make_up_the_word_count_column_999999999_1;
    private String make_up_the_word_count_column_999999999_2;
    private String make_up_the_word_count_column_999999999_3;
    private String make_up_the_word_count_column_999999999_4;
    private String make_up_the_word_count_column_999999999_5;
    private String make_up_the_word_count_column_999999999_6;
    private String make_up_the_word_count_column_999999999_7;
    private String make_up_the_word_count_column_999999999_8;
    private String make_up_the_word_count_column_999999999_9;
    private String make_up_the_word_count_column_999999999_10;
    private String make_up_the_word_count_column_999999999_11;
    private String make_up_the_word_count_column_999999999_12;
    private String make_up_the_word_count_column_999999999_13;
    private String make_up_the_word_count_column_999999999_14;
    private String make_up_the_word_count_column_999999999_15;
    private String make_up_the_word_count_column_999999999_16;
    private String make_up_the_word_count_column_999999999_17;
    private String make_up_the_word_count_column_999999999_18;
    private String make_up_the_word_count_column_999999999_19;
    private String make_up_the_word_count_column_999999999_20;
 
    public String getMake_up_the_word_count_column_999999999_1() {
        return make_up_the_word_count_column_999999999_1;
    }
 
    public void setMake_up_the_word_count_column_999999999_1(String make_up_the_word_count_column_999999999_1) {
        this.make_up_the_word_count_column_999999999_1 = make_up_the_word_count_column_999999999_1;
    }
 
    public String getMake_up_the_word_count_column_999999999_2() {
        return make_up_the_word_count_column_999999999_2;
    }
 
    public void setMake_up_the_word_count_column_999999999_2(String make_up_the_word_count_column_999999999_2) {
        this.make_up_the_word_count_column_999999999_2 = make_up_the_word_count_column_999999999_2;
    }
 
    public String getMake_up_the_word_count_column_999999999_3() {
        return make_up_the_word_count_column_999999999_3;
    }
 
    public void setMake_up_the_word_count_column_999999999_3(String make_up_the_word_count_column_999999999_3) {
        this.make_up_the_word_count_column_999999999_3 = make_up_the_word_count_column_999999999_3;
    }
 
    public String getMake_up_the_word_count_column_999999999_4() {
        return make_up_the_word_count_column_999999999_4;
    }
 
    public void setMake_up_the_word_count_column_999999999_4(String make_up_the_word_count_column_999999999_4) {
        this.make_up_the_word_count_column_999999999_4 = make_up_the_word_count_column_999999999_4;
    }
 
    public String getMake_up_the_word_count_column_999999999_5() {
        return make_up_the_word_count_column_999999999_5;
    }
 
    public void setMake_up_the_word_count_column_999999999_5(String make_up_the_word_count_column_999999999_5) {
        this.make_up_the_word_count_column_999999999_5 = make_up_the_word_count_column_999999999_5;
    }
 
    public String getMake_up_the_word_count_column_999999999_6() {
        return make_up_the_word_count_column_999999999_6;
    }
 
    public void setMake_up_the_word_count_column_999999999_6(String make_up_the_word_count_column_999999999_6) {
        this.make_up_the_word_count_column_999999999_6 = make_up_the_word_count_column_999999999_6;
    }
 
    public String getMake_up_the_word_count_column_999999999_7() {
        return make_up_the_word_count_column_999999999_7;
    }
 
    public void setMake_up_the_word_count_column_999999999_7(String make_up_the_word_count_column_999999999_7) {
        this.make_up_the_word_count_column_999999999_7 = make_up_the_word_count_column_999999999_7;
    }
 
    public String getMake_up_the_word_count_column_999999999_8() {
        return make_up_the_word_count_column_999999999_8;
    }
 
    public void setMake_up_the_word_count_column_999999999_8(String make_up_the_word_count_column_999999999_8) {
        this.make_up_the_word_count_column_999999999_8 = make_up_the_word_count_column_999999999_8;
    }
 
    public String getMake_up_the_word_count_column_999999999_9() {
        return make_up_the_word_count_column_999999999_9;
    }
 
    public void setMake_up_the_word_count_column_999999999_9(String make_up_the_word_count_column_999999999_9) {
        this.make_up_the_word_count_column_999999999_9 = make_up_the_word_count_column_999999999_9;
    }
 
    public String getMake_up_the_word_count_column_999999999_10() {
        return make_up_the_word_count_column_999999999_10;
    }
 
    public void setMake_up_the_word_count_column_999999999_10(String make_up_the_word_count_column_999999999_10) {
        this.make_up_the_word_count_column_999999999_10 = make_up_the_word_count_column_999999999_10;
    }
 
    public String getMake_up_the_word_count_column_999999999_11() {
        return make_up_the_word_count_column_999999999_11;
    }
 
    public void setMake_up_the_word_count_column_999999999_11(String make_up_the_word_count_column_999999999_11) {
        this.make_up_the_word_count_column_999999999_11 = make_up_the_word_count_column_999999999_11;
    }
 
    public String getMake_up_the_word_count_column_999999999_12() {
        return make_up_the_word_count_column_999999999_12;
    }
 
    public void setMake_up_the_word_count_column_999999999_12(String make_up_the_word_count_column_999999999_12) {
        this.make_up_the_word_count_column_999999999_12 = make_up_the_word_count_column_999999999_12;
    }
 
    public String getMake_up_the_word_count_column_999999999_13() {
        return make_up_the_word_count_column_999999999_13;
    }
 
    public void setMake_up_the_word_count_column_999999999_13(String make_up_the_word_count_column_999999999_13) {
        this.make_up_the_word_count_column_999999999_13 = make_up_the_word_count_column_999999999_13;
    }
 
    public String getMake_up_the_word_count_column_999999999_14() {
        return make_up_the_word_count_column_999999999_14;
    }
 
    public void setMake_up_the_word_count_column_999999999_14(String make_up_the_word_count_column_999999999_14) {
        this.make_up_the_word_count_column_999999999_14 = make_up_the_word_count_column_999999999_14;
    }
 
    public String getMake_up_the_word_count_column_999999999_15() {
        return make_up_the_word_count_column_999999999_15;
    }
 
    public void setMake_up_the_word_count_column_999999999_15(String make_up_the_word_count_column_999999999_15) {
        this.make_up_the_word_count_column_999999999_15 = make_up_the_word_count_column_999999999_15;
    }
 
    public String getMake_up_the_word_count_column_999999999_16() {
        return make_up_the_word_count_column_999999999_16;
    }
 
    public void setMake_up_the_word_count_column_999999999_16(String make_up_the_word_count_column_999999999_16) {
        this.make_up_the_word_count_column_999999999_16 = make_up_the_word_count_column_999999999_16;
    }
 
    public String getMake_up_the_word_count_column_999999999_17() {
        return make_up_the_word_count_column_999999999_17;
    }
 
    public void setMake_up_the_word_count_column_999999999_17(String make_up_the_word_count_column_999999999_17) {
        this.make_up_the_word_count_column_999999999_17 = make_up_the_word_count_column_999999999_17;
    }
 
    public String getMake_up_the_word_count_column_999999999_18() {
        return make_up_the_word_count_column_999999999_18;
    }
 
    public void setMake_up_the_word_count_column_999999999_18(String make_up_the_word_count_column_999999999_18) {
        this.make_up_the_word_count_column_999999999_18 = make_up_the_word_count_column_999999999_18;
    }
 
    public String getMake_up_the_word_count_column_999999999_19() {
        return make_up_the_word_count_column_999999999_19;
    }
 
    public void setMake_up_the_word_count_column_999999999_19(String make_up_the_word_count_column_999999999_19) {
        this.make_up_the_word_count_column_999999999_19 = make_up_the_word_count_column_999999999_19;
    }
 
    public String getMake_up_the_word_count_column_999999999_20() {
        return make_up_the_word_count_column_999999999_20;
    }
 
    public void setMake_up_the_word_count_column_999999999_20(String make_up_the_word_count_column_999999999_20) {
        this.make_up_the_word_count_column_999999999_20 = make_up_the_word_count_column_999999999_20;
    }
}

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

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

相关文章

SpringBoot整合elasticsearch-java

一、依赖 系统使用的是ElasticSearch8.2.0 <dependency><groupId>co.elastic.clients</groupId><artifactId>elasticsearch-java</artifactId><version>8.1.0</version> </dependency> 二、配置 1、yml文件配置 elastics…

移动式气象站:便携科技的天气守望者

在科技日新月异的今天&#xff0c;我们身边的许多设备都在向着更加智能化、便携化的方向发展。而在气象观测领域&#xff0c;移动式气象站的出现&#xff0c;不仅改变了传统气象观测的固有模式&#xff0c;更以其灵活性和实时性&#xff0c;在气象监测、灾害预警等领域发挥着越…

苹果电脑暂存盘已满怎么清理 Mac系统如何清理磁盘空间 清理MacBook

Mac电脑用户在长时间使用电脑之后&#xff0c;时常会看到“暂存盘已满”的提示&#xff0c;这无疑会给后续的电脑使用带来烦恼&#xff0c;那么苹果电脑暂存盘已满怎么清理呢&#xff0c;下面将给大家带来一些干货帮你更好地解决这个问题。 首先我们要搞明白为什么暂存盘会满&…

IEC104转MQTT网关支持MQTT对接Ignition、阿里云、华为云、亚马逊AWS、ThingsBoard、Zabbix平台助力远程管理

钡铼推出了一款专为电力系统设计的数据采集网关——IEC104转MQTT网关BE113&#xff0c;感兴趣的朋友接着往下看&#xff1a; 一、网关概述 IEC104转MQTT(Ignition)网关BE113是一款专为电力系统设计的数据采集网关&#xff0c;支持DL/T645和IEC104等协议的设备。上行支持MQTT协…

The Sandbox:虚拟游戏世界生态系统详解

元宇宙由区块链、软件基础、移动应用、控制台等组成&#xff0c;是一个虚拟空间&#xff0c;结合了增强现实&#xff08;AR&#xff09;、虚拟现实&#xff08;VR&#xff09;和在线游戏等元素。它强调互操作性&#xff0c;允许用户在不同的虚拟平台之间自由切换。与传统的现实…

Tensorflow2.0全套学习(持续更新中)

0 简介 1.学习目标 两大核心模块&#xff1a;深度学习经典算法与Tensorflow项目实战 从零开始&#xff0c;详细的网络模型架构与框架实现方法 2.tensorflow&#xff1a;核心开源库&#xff0c;深度学习框架&#xff0c;帮助开发和训练机器学习模型 3.版本2比1有哪些优势 …

【深度学习】GoogLeNet实战

目录 1.猫狗识别 1.1data_partitioning.py 1.2mean_std.py 1.3model.py 1.4model_train.py 1.5model_test.py 2.水果识别 2.1data_partitioning.py 2.2mean_std.py 2.3model.py 2.4model_train.py 2.5model.test.py 1.猫狗识别 1.1data_partitioning.py import o…

杂项——电阻式角度传感器使用

三个引脚&#xff0c;分别接3.3V&#xff0c;GND&#xff0c;ADC引脚。12位ADC有4096份&#xff0c;将360分成4096份&#xff0c;再乘以单片机返回的模拟量的值&#xff0c;即可得到角度。 M0代码 #include "ti_msp_dl_config.h"volatile bool gCheckADC; volatile …

昇思25天学习打卡营第21天|CV-Shufflenet图像分类

打卡 目录 打卡 ShuffleNet 网络介绍 ShuffleNet 模型架构 Pointwise Group Convolution Channel Shuffle ShuffleNet模块 ShuffleNet 模块代码 构建ShuffleNet网络 模块代码 模型训练和评估 模型训练 模型评估 模型预测 ShuffleNet 网络介绍 ShuffleNetV1是旷视科…

vue3+vite纯前端实现自动触发浏览器刷新更新版本内容,并在打包时生成版本号文件

前言 在前端项目中&#xff0c;有时候为了实现自动触发浏览器刷新并更新版本内容&#xff0c;可以采取一系列巧妙的措施。我的项目中是需要在打包时候生成一个version.js文件&#xff0c;用当前打包时间作为版本的唯一标识&#xff0c;然后打包发版 &#xff0c;从实现对版本更…

【Golang 面试基础题】每日 5 题(八)

✍个人博客&#xff1a;Pandaconda-CSDN博客 &#x1f4e3;专栏地址&#xff1a;http://t.csdnimg.cn/UWz06 &#x1f4da;专栏简介&#xff1a;在这个专栏中&#xff0c;我将会分享 Golang 面试中常见的面试题给大家~ ❤️如果有收获的话&#xff0c;欢迎点赞&#x1f44d;收藏…

【YashanDB知识库】绑定参数,同一个sql多个执行计划的问题

问题现象 同一个sql有两个执行计划&#xff0c;是否合理&#xff1f; 它的EXECUTIONS&#xff0c;ELAPSED_TIME等统计信息怎么看&#xff0c;是独立分开的还是统一计算的&#xff1f; 如下图&#xff1a; 问题影响版本 tpcc测试&#xff1a;23.2.1.100 问题的风险及影响 …

无人机公司销售需要什么资质

国家民航局于2024年1月1日实施了《无人驾驶航空器飞行管理暂行条例》&#xff0c;根据这个管理条例里面的 第十一条 使用除微型以外的民用无人驾驶航空器从事飞行活动的单位应当具备下列条件&#xff0c;并向国务院民用航空主管部门或者地区民用航空管理机构申请取得民用无人驾…

若依+AI项目开发(二)

后端代码分析 二次开发 开始执行 生成成功 创建子模块

电子签章-开放签应用

开放签电子签章系统开源工具版旨在将电子签章、电子合同系统开发中的前后端核心技术开源开放&#xff0c;适合有技术能力的个人 / 团队学习或自建电子签章 \ 电子合同功能或应用&#xff0c;避免研发同仁在工作过程中重复造轮子&#xff0c;降低电子签章技术研发要求&#xff0…

如何解决ChromeDriver 126找不到chromedriver.exe问题

引言 在使用Selenium和ChromeDriver进行网页自动化时&#xff0c;ChromeDriver与Chrome浏览器版本不匹配的问题时有发生。最近&#xff0c;许多开发者在使用ChromeDriver 126时遇到了无法找到chromedriver.exe文件的错误。本文将介绍该问题的原因&#xff0c;并提供详细的解决…

mysql-bin 恢复数据库

能看到这里的同学估计肯定摊上大事了吧&#xff01;不要慌&#xff0c;一定要冷静&#xff0c;记录一下作者的大事件吧&#xff0c;黑客通过SQL注入的方式执行了一段SQL &#xff1a; DROP DATABASE ****** 后果就是导致整个数据库被删了&#xff0c;当时心是拔凉拔凉的&#x…

3.2、数据结构-数组、矩阵和广义表

数组结构 数组是定长线性表在维度上的扩展,即线性表中的元素又是一个线性表。N维数组是一种“同构”的数据结构,其每个数据元素类型相同、结构一致。 一个m行n列的数组表示如下: 其可以表示为行向量形式&#xff08;一行一行的数据&#xff09;或者列向量形式&#xff08;一…

收银系统源码视频介绍

千呼新零售2.0系统是零售行业连锁店一体化收银系统&#xff0c;包括线下收银线上商城连锁店管理ERP管理商品管理供应商管理会员营销等功能为一体&#xff0c;线上线下数据全部打通。 适用于商超、便利店、水果、生鲜、母婴、服装、零食、百货、宠物等连锁店使用。 详细介绍请…

Haproxy 可观测性最佳实践

HAProxy 是一款广泛使用的高性能负载均衡器&#xff0c;支持 TCP 和 HTTP 协议&#xff0c;提供高可用性、负载均衡和代理服务。 HAProxy 2.0 以上版本提供了完善的指标暴露体系&#xff0c;方便观测云收集对应的指标信息。 版本要求 HAProxy 2.0 HAProxy Enterprise 2.0r1 HAP…