Browse Source

feat: 修改寻车提示语,修改地图文件

pull/25/head
张耀 3 years ago
parent
commit
a4906b348e
  1. 2
      public/static/offline/JSON/GetDevCoordinateByIP.json
  2. 12
      public/static/qm/MainMap_QM.js
  3. 4
      src/components/HomeDialog/HomeDialog.vue
  4. 6
      src/composables/useFindCar.ts

2
public/static/offline/JSON/GetDevCoordinateByIP.json

@ -16,7 +16,7 @@
"ip": "192.168.1.209",
"mac": "4CEDFBCAFF27",
"location": "30",
"angle": "90",
"angle": "135",
"projectCode": "project-n-ww5jvpwnu0ads70lbkda"
}
}

12
public/static/qm/MainMap_QM.js

@ -2158,6 +2158,7 @@ MainMap_QM.prototype = {
},
onInnerMeDir: function () {
this.changeMapModel("2D");
Map_QM.controls.reset();
Map_QM.controls.maxPolarAngle = 0
Map_QM.controls.minPolarAngle = 0
if (Map_QM.util.pathStateObj.isPathState) {
@ -2171,8 +2172,10 @@ MainMap_QM.prototype = {
Map_QM.controls.target = new THREE.Vector3(0, 0, 0)
}
Map_QM.controls.setZoom(Map_QM.util.options.camZoom)
Map_QM.rotationAngle(Map_QM.util.deviceObj.angle)
Map_QM.controls.enableRotate = false
setTimeout(()=>{
Map_QM.rotationAngle(Map_QM.util.deviceObj.angle)
Map_QM.controls.enableRotate = false
},50);
},
changeMapModel: function (model) {
if (model == "2D") {
@ -2646,9 +2649,8 @@ MainMap_QM.prototype = {
*
*/
rotationAngle: function (angle) {
if(Math.abs(parseInt(angle)+Map_QM.controls.getRotateHorizontal()*180/Math.PI)>5){
Map_QM.controls.setRotateHorizontal((angle / 180) * Math.PI)
}
Map_QM.controls.setRotateHorizontal(Map_QM.controls.getRotateHorizontal());
Map_QM.controls.setRotateHorizontal((angle / 180) * Math.PI)
},
/**
* @api {方法} rotateAngle(angle) 改变垂直角度

4
src/components/HomeDialog/HomeDialog.vue

@ -51,9 +51,9 @@ function move() {
// }
// console.log('x,y :>> ', x, y)
tip.value.style.transform = `translate(${x}px,${y}px)` //
i += 0.75 //35
i += 1 //35
//10i+=3i36912...
j += 0.75
j += 1
x = i
y = j
if (i >= winWidth) {

6
src/composables/useFindCar.ts

@ -31,7 +31,11 @@ export const useFindCar = () => {
}
return
}
Message({ text: msg, type: 'success' })
if (msg) {
Message({ text: msg, type: 'success' })
} else {
Message({ type: 'success', text: '未能获取数据,请稍后重试!' })
}
} catch (error) {
Message({ text: error as string, type: 'success' })
} finally {

Loading…
Cancel
Save