From e805a97a6d8ac67351899f48929c6844b128f6f6 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 8 Nov 2019 19:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AC=E6=8D=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/main/model/RailList.js | 32 ++++++++++++++++++++++-------- src/utils/baseUrl.js | 4 ++-- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/jlmap3d/main/model/RailList.js b/src/jlmap3d/main/model/RailList.js index 3f8ffa15c..0a9ee2616 100644 --- a/src/jlmap3d/main/model/RailList.js +++ b/src/jlmap3d/main/model/RailList.js @@ -266,8 +266,10 @@ export function RailList(){ let num = scope.linkrail[linklist[j].code].lineleft.points.length-1; let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x; - stop.direct1.percent = (standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x)/lengthfacts; - stop.direct2.percent = (standsdata[n].position.x+64-scope.linkrail[linklist[j].code].lineleft.points[0].x)/lengthfacts; + let directoffset1 = standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x; + let directoffset2 = standsdata[n].position.x+64-scope.linkrail[linklist[j].code].lineleft.points[0].x; + stop.direct1.percent = directoffset1/lengthfacts; + stop.direct2.percent = directoffset1/lengthfacts; console.log(scope.linkrail[linklist[j].code]); console.log("sectoffsetleft"); console.log(standsections[i].leftStopPointOffset); @@ -291,28 +293,42 @@ export function RailList(){ }else{ let num = scope.linkrail[linklist[j].code].lineleft.points.length-1; let lengthfacts = scope.linkrail[linklist[j].code].lineleft.points[num].x - scope.linkrail[linklist[j].code].lineleft.points[0].x; - stop.direct1.percent = (standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x)/lengthfacts; - stop.direct2.percent = (standsdata[n].position.x+64-scope.linkrail[linklist[j].code].lineleft.points[0].x)/lengthfacts; + let directoffset1 = standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x; + let directoffset2 = standsdata[n].position.x+64-scope.linkrail[linklist[j].code].lineleft.points[0].x; + stop.direct1.percent = directoffset1/lengthfacts; + stop.direct2.percent = directoffset1/lengthfacts; console.log(scope.linkrail[linklist[j].code]); + console.log(directoffset1); + console.log(directoffset1); console.log("sectoffsetleft"); + console.log(stop.direct2.percent); + console.log(scope.linkrail[linklist[j].code].lengthfact); + console.log(lengthfacts); + console.log("........................"); console.log(standsections[i].leftStopPointOffset); - console.log(standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lp.x); + console.log(standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x); + console.log("........................"); console.log(standsdata[n].position.x+64); console.log(scope.linkrail[linklist[j].code].lineleft.getPointAt(stop.direct2.percent).x); console.log("sectoffsetright"); + console.log(stop.direct1.percent); + console.log(scope.linkrail[linklist[j].code].lengthfact); + console.log(lengthfacts); + console.log("........................"); console.log(standsections[i].rightStopPointOffset); - console.log(standsdata[n].position.x+64-scope.linkrail[linklist[j].code].lp.x); + console.log(standsdata[n].position.x-64-scope.linkrail[linklist[j].code].lineleft.points[0].x); + console.log("........................"); console.log(standsdata[n].position.x-64); console.log(scope.linkrail[linklist[j].code].lineleft.getPointAt(stop.direct1.percent).x); circle1.position.x = standsdata[n].position.x+64; circle1.position.y = 5; circle1.position.z = scope.linkrail[linklist[j].code].points[0].z+(standsdata[n].position.z-scope.linkrail[linklist[j].code].points[0].z)*2; - circle1.rotation.x = 0; + circle1.rotation.x = -Math.PI/2; circle2.position.x = standsdata[n].position.x-64; circle2.position.y = 5; circle2.position.z = scope.linkrail[linklist[j].code].points[0].z; - circle2.rotation.x = Math.PI; + circle2.rotation.x = -Math.PI/2; } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 469782cec..55be58dc3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,11 @@ 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.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 杜闪 - BASE_API = 'http://192.168.3.82:9000'; // 杜康 + // BASE_API = 'http://192.168.3.82:9000'; // 杜康 } else { BASE_API = process.env.VUE_APP_BASE_API; }