This commit is contained in:
fan 2021-06-17 14:53:26 +08:00
commit 33224d4dd0
3 changed files with 16 additions and 22 deletions

View File

@ -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'; // 旭强 无线

View File

@ -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(mx<px&&my>py){//
angle = 180+angle;
}
if(mx<px&&my==py){//鼠标在x轴负方
angle = 270;
}
//
// if(mx<px&&my==py){//x
// angle = 270;
// }
if(mx<px&&my<py){//鼠标在第二象限
angle = 360 - angle;
}
angle += 180;
if(angle >292 && angle<427){
let stopspeed = 0;
if(angle>=397){

View File

@ -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) => {