diff --git a/public/static/offline/JSON/GetDevCoordinateByIP.json b/public/static/offline/JSON/GetDevCoordinateByIP.json index 07fe547..dd0d2a8 100644 --- a/public/static/offline/JSON/GetDevCoordinateByIP.json +++ b/public/static/offline/JSON/GetDevCoordinateByIP.json @@ -7,11 +7,12 @@ "label": "windows", "screenAttribute": "命", "building": "A栋", - "buildingCode": 11101, + "deviceCode": "11101009", + "buildingCode": "11101", "projectCode": "project-200", "floor": "L1层", "floorOrder": 2, - "floorCode": 11101003, + "floorCode": "11101003", "ip": "192.168.1.134", "mac": "Excepteur", "location": "43", diff --git a/public/static/offline/JSON/config.json b/public/static/offline/JSON/config.json index fa802bd..80401bb 100644 --- a/public/static/offline/JSON/config.json +++ b/public/static/offline/JSON/config.json @@ -2,7 +2,7 @@ "code": "200", "msg": "", "data": { - "interfaceUrl": "https://test.iot.1000my.com/api/guide/v1/web", + "interfaceUrl": "https://test.iot.1000my.com/api", "sourceUrl": "https://test-598d.obs.cn-east-2.myhuaweicloud.com", "backSocket": "ws://127.0.0.1:7181" } diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js index 8fd541d..29f55bb 100644 --- a/public/static/qm/MainMap_QM.js +++ b/public/static/qm/MainMap_QM.js @@ -313,30 +313,39 @@ ConfigFun = function () { * "data": [] * } */ - this.getInstance = function (callBack, build = 0, floor = 0, navPoint = 1, angle = 0, mallCode = '', _url = 'http://saas.1000my.com:8013') { + this.getInstance = function (callBack, build = 0, floor = 0, navPoint = 1, angle = 0, mallCode = 'project-200', _url = 'https://test.iot.1000my.com') { Config.startObj.build = Config.deviceObj.build = parseInt(build) || 0 Config.startObj.floor = Config.deviceObj.floor = parseInt(floor) || 0 Config.startObj.node = Config.deviceObj.node = parseInt(navPoint) || 1 Config.deviceObj.angle = parseInt(angle) || 0 Config.selectFloor = Config.deviceObj.floor Config.selectBuild = Config.deviceObj.build + Config.mallCode = mallCode + Config.cloudUrl = _url + let tim = Config.timeStamp(); let backObj = { code: 200, msg: '加载成功', data: [] } - this.readTextFile(Config.mapServerInfo, function (res) { - try { - if (res.data.mallKey != 'Zeditor') { - Config.allMap = JSON.parse(res.data.mapData) - } else { - Config.allMap = JSON.parse(LZString.decompressFromBase64(res.data.mapData)) + Config.requestNoJM({ + method: "GET", + url: Config.cloudUrl + '/api/guide/v1/web/getMallMapData/'+Config.mallCode +'/Aeditor?time=' + tim, + success: (res) => { + try { + if (res.data.mallKey != 'Zeditor') { + Config.allMap = JSON.parse(res.data.mapData) + } else { + Config.allMap = JSON.parse(LZString.decompressFromBase64(res.data.mapData)) + } + } catch (e) { + backObj.code = 404 + backObj.msg = '地图数据JSON格式错误' + callBack(backObj) + callBack = null } - } catch (e) { - backObj.code = 404 - backObj.msg = '地图数据JSON格式错误' - callBack(backObj) - callBack = null - } - //console.log(Config.allMap); - Config.getShopData(callBack) - }) + //console.log(Config.allMap); + Config.getShopData(callBack) + }, + fail: () => {} + }); + } /*** ----------------------------------------------- 参数 API END ----------------------------------------------- **** */ this.Point = function (x = 0, y = 0) { @@ -398,9 +407,7 @@ ConfigFun = function () { params.fail() } xmlhttp.open(params.method, params.url, true) - //xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "*"); xmlhttp.setRequestHeader('Content-type', 'application/json') - //xmlhttp.setRequestHeader("Access-Control-Allow-Method", "POST,GET"); xmlhttp.send(params.data) } this.requestNoJM = function (params) { @@ -425,9 +432,7 @@ ConfigFun = function () { params.fail() } xmlhttp.open(params.method, params.url, true) - //xmlhttp.setRequestHeader("Access-Control-Allow-Origin", "*"); - // xmlhttp.setRequestHeader('Content-Type', 'application/json') - //xmlhttp.setRequestHeader("Access-Control-Allow-Method", "POST,GET"); + xmlhttp.setRequestHeader('projectCode', Config.mallCode); xmlhttp.send(params.data) } @@ -1496,7 +1501,7 @@ ConfigFun = function () { let backObj = { code: 200, msg: '加载成功', data: [] } Config.requestNoJM({ method: 'GET', - url: 'https://test.iot.1000my.com/api/guide/v1/web/getMapInfo?projectCode=' + 'project-200', + url: Config.cloudUrl + '/api/guide/v1/web/getMapInfo?projectCode=' + Config.mallCode, success: res => { if (res.code == '200') { Config.shopData = res.data.shopList @@ -4631,19 +4636,19 @@ MainMap_QM.prototype = { * Map_QM.changeWindowResize(1280,1080); */ changeWindowResize: function (width = -1, height = -1) { - aspect = width / height - cameraPerspective.aspect = aspect - cameraPerspective.updateProjectionMatrix() - cameraOrtho.left = (340 * aspect) / -2 - cameraOrtho.right = (340 * aspect) / 2 - cameraOrtho.top = 340 / 2 - cameraOrtho.bottom = 340 / -2 - cameraOrtho.updateProjectionMatrix() - - Map_QM.renderer.setSize(width, height) - Map_QM.labelRenderer.setSize(width, height) - Map_QM.w = width - Map_QM.h = height + aspect = width/height; + cameraPerspective.aspect = aspect; + cameraPerspective.updateProjectionMatrix(); + cameraOrtho.left = 340 * aspect / -2; + cameraOrtho.right = 340 * aspect / 2; + cameraOrtho.top = 340/2; + cameraOrtho.bottom = 340/-2; + cameraOrtho.updateProjectionMatrix(); + + Map_QM.renderer.setSize(width, height); + Map_QM.labelRenderer.setSize(width, height); + Map_QM.w = width; + Map_QM.h = height; } } Object.assign(MainMap_QM.prototype, THREE.EventDispatcher.prototype) diff --git a/src/assets/scss/variables.scss b/src/assets/scss/variables.scss index 58eff75..1a846ae 100644 --- a/src/assets/scss/variables.scss +++ b/src/assets/scss/variables.scss @@ -26,7 +26,7 @@ --color-linear-lightgoldenyellow: linear-gradient(90deg, #ffbd35 0%, #ffd260 100%); --color-linear-goldenyellow: linear-gradient(90deg, #f6a62c 0%, #ffbc3f 100%); --color-linear-golden: linear-gradient(117deg, #c99e6b 0%, #e2c894 100%); - --color-linear-pink: linear-gradielinear-gradient(96.8deg, #e2acbc 3%, #ffece8 100%); + --color-linear-pink: linear-gradient(96.8deg, #e2acbc 3%, #ffece8 100%); --color-linear-lightyellow: linear-gradient(96deg, #dcc7a7 3%, #f1ddc5 100%); --color-linear-blue: linear-gradient(96.8deg, #acc2e2 2.93%, #ddf0fe 100%); diff --git a/src/components/BrandDetail/BrandDetail.vue b/src/components/BrandDetail/BrandDetail.vue index ed686e7..47bd06c 100644 --- a/src/components/BrandDetail/BrandDetail.vue +++ b/src/components/BrandDetail/BrandDetail.vue @@ -83,7 +83,7 @@

147¥/人

-
{{ $t('join') }}
+
{{ $t('join') }}
@@ -91,12 +91,15 @@