|
@@ -5,7 +5,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { region, Booth } from "@/data/raw.js";
|
|
|
|
|
|
+import { region } from "@/data/raw.js";
|
|
|
|
+import { Booth } from "@/data/booth.js";
|
|
|
|
+
|
|
let firstView = {};
|
|
let firstView = {};
|
|
region.forEach((item) => {
|
|
region.forEach((item) => {
|
|
let { x, y, z, w } = item.firstView.panoQuaternion;
|
|
let { x, y, z, w } = item.firstView.panoQuaternion;
|
|
@@ -26,8 +28,17 @@ export default {
|
|
boothItem: function() {
|
|
boothItem: function() {
|
|
let tmp = "";
|
|
let tmp = "";
|
|
if (this.boothId) {
|
|
if (this.boothId) {
|
|
- let tt = Booth.find((item) => item.id == this.boothId);
|
|
|
|
- let { x, y, z, w } = tt.panoQuaternion;
|
|
|
|
|
|
+ let tt = ''
|
|
|
|
+ for (let index = 0; index < Booth.length; index++) {
|
|
|
|
+ const item = Booth[index];
|
|
|
|
+ tt = item.company.find(sub=>sub.panoId==this.boothId)
|
|
|
|
+ if (tt) {
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let panoQuat = tt.firstView.split("qua:")[1];
|
|
|
|
+ let [x, y, z, w] = panoQuat.split(",");
|
|
tmp = `&firstView=pano:${tt.panoId},qua:${x + ", " + y + ", " + z + ", " + w}`;
|
|
tmp = `&firstView=pano:${tt.panoId},qua:${x + ", " + y + ", " + z + ", " + w}`;
|
|
}
|
|
}
|
|
return tmp;
|
|
return tmp;
|