From 7936d33506cc6e089598ff0515d2fe4b6c1bdaaf Mon Sep 17 00:00:00 2001 From: tangyi <275503107@qq.com> Date: Wed, 22 Sep 2021 16:13:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htmls/contactUs/contactUs.html | 73 +++++++++++++++++++++++++++------- js/huaxia.js | 2 +- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/htmls/contactUs/contactUs.html b/htmls/contactUs/contactUs.html index e3cede5..f20dc42 100644 --- a/htmls/contactUs/contactUs.html +++ b/htmls/contactUs/contactUs.html @@ -20,7 +20,7 @@ #allmap { width: 100%; height: 100%; - + margin: 0; font-family: "微软雅黑"; } @@ -118,21 +118,66 @@ }); } - LoadBaiduMapScript().then((BMap)=>{ + LoadBaiduMapScript().then((BMap) => { // 百度地图API功能 + function SquareOverlay(center, length, color) { + this._center = center; + this._length = length; + this._color = color; + } var map = new BMap.Map("allmap"); // 创建Map实例 - map.centerAndZoom(new BMap.Point(116.404, 39.915), 11); // 初始化地图,设置中心点坐标和地图级别 - //添加地图类型控件 - map.addControl(new BMap.MapTypeControl({ - mapTypes: [ - BMAP_NORMAL_MAP, - BMAP_HYBRID_MAP - ] - })); - map.setCurrentCity("成都"); // 设置地图显示的城市 此项是必须设置的 - map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 - }) - + + map.centerAndZoom(new BMap.Point(104.067923463, 30.6799428454), 11); // 初始化地图,设置中心点坐标和地图级别 + //添加地图类型控件 + + // 继承API的BMap.Overlay + SquareOverlay.prototype = new BMap.Overlay(); + SquareOverlay.prototype.initialize = function (map) { + // 保存map对象实例 + this._map = map; + // 创建div元素,作为自定义覆盖物的容器 + var div = document.createElement("div"); + div.style.position = "absolute"; + // 可以根据参数设置元素外观 + div.style.width = this._length + "px"; + div.style.height = this._length + "px"; + div.style.background = this._color; + // 将div添加到覆盖物容器中 + map.getPanes().markerPane.appendChild(div); + // 保存div实例 + this._div = div; + // 需要将div元素作为方法的返回值,当调用该覆盖物的show、 + // hide方法,或者对覆盖物进行移除时,API都将操作此元素。 + return div; + } + SquareOverlay.prototype.draw = function(){ +// 根据地理坐标转换为像素坐标,并设置给容器 + var position = this._map.pointToOverlayPixel(this._center); + this._div.style.left = position.x - this._length / 2 + "px"; + this._div.style.top = position.y - this._length / 2 + "px"; +} +SquareOverlay.prototype.show = function(){ + if (this._div){ + this._div.style.display = ""; + } +} +// 实现隐藏方法 +SquareOverlay.prototype.hide = function(){ + if (this._div){ + this._div.style.display = "none"; + } +} + map.addControl(new BMap.MapTypeControl({ + mapTypes: [ + BMAP_NORMAL_MAP, + BMAP_HYBRID_MAP + ] + })); + + map.setCurrentCity("武汉"); // 设置地图显示的城市 此项是必须设置的 + map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 + }) + diff --git a/js/huaxia.js b/js/huaxia.js index f8a4b3b..b60f6e4 100644 --- a/js/huaxia.js +++ b/js/huaxia.js @@ -340,7 +340,7 @@ $(function(){ $(e.target).next().css('display','inline') console.log($(e.target).next().attr("class")); if ($(e.target).next().attr("class")!="upImg") { - console.log(123); + $(".uptoux").attr('src',$filePath); $(".ty_topimgtx").css("display","block") From 52d752f9f431c51c534ab2396c92dec9ee76eb3f Mon Sep 17 00:00:00 2001 From: tangyi <275503107@qq.com> Date: Wed, 22 Sep 2021 17:42:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=B4=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htmls/aboutUs/aboutUs.html | 33 ++++++--- htmls/artistCenter/artistCenter.html | 21 +++++- htmls/contactUs/contactUs.html | 106 +++++++++++++-------------- htmls/logshoppingcar/shopcar.html | 21 +++++- img/public/dwionv.png | Bin 0 -> 998 bytes 5 files changed, 113 insertions(+), 68 deletions(-) create mode 100644 img/public/dwionv.png diff --git a/htmls/aboutUs/aboutUs.html b/htmls/aboutUs/aboutUs.html index 1aeeae1..aa48156 100644 --- a/htmls/aboutUs/aboutUs.html +++ b/htmls/aboutUs/aboutUs.html @@ -8,7 +8,7 @@