diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 648fd20ce..3a11ac066 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,7 +2,7 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue index 75525e72c..04c59130b 100644 --- a/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue @@ -256,23 +256,19 @@ } }, touchstartbrake:function(e){ - - let domoffset = document.getElementById("directimgbrake").getBoundingClientRect(); // movelimit this.angleoffset.x = domoffset.x; this.angleoffset.y = domoffset.y; - e.preventDefault(); document.getElementById("directimgbrake").onmousemove = this.touchmovebrake; document.getElementById("directimgbrake").onmouseup = this.touchendbrake; - }, touchmovebrake:function(e){//finger move 触发 - // console.log(e); + this.getAnglebrake(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y); }, touchendbrake:function(e){ @@ -281,10 +277,9 @@ }, getAnglebrake:function(mx,my){ //圆心坐标 - // console.log(mx); - // console.log(my); + let px=150; - let py=150; + let py=170; let x = Math.abs(px-mx); let y = Math.abs(py-my); let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2)); @@ -296,28 +291,27 @@ angle = 180 - angle; } - if(mx==px&&my>py){//鼠标在y轴负方向上 - angle = 180; - } - - if(mx>px&&my==py){//鼠标在x轴正方向上 - angle = 90; - } + // if(mx==px&&my>py){//鼠标在y轴负方向上 + // angle = 180; + // } + // + // if(mx>px&&my==py){//鼠标在x轴正方向上 + // angle = 90; + // } if(mxpy){//鼠标在第三象限 angle = 180+angle; } - - if(mx292 && angle<427){ let stopspeed = 0; if(angle>=397){ diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue index d90bd73d5..b49574677 100644 --- a/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue @@ -293,7 +293,7 @@ pos:parseInt(this.stalls[this.stallh][this.stalll].type) }; const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id); - + console.log(userInfo); trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Gear_Change").then(res => { // console.log(res); }).catch((error) => {