fix: 商品视角锁定

This commit is contained in:
wam
2022-11-20 19:18:06 +08:00
parent 33dc46f13f
commit 76afac7ca5
7 changed files with 102 additions and 85 deletions

View File

@@ -17,6 +17,7 @@
:surveyId="surveyId" :surveyId="surveyId"
:defaultWare="defaultWare" :defaultWare="defaultWare"
:isLocked="!!config.is_initialize" :isLocked="!!config.is_initialize"
:freezeRotY="!!config.is_default_perspective"
@onBehaviorFlush="onBehaviorFlush" @onBehaviorFlush="onBehaviorFlush"
/> />
<div :class="isMobile?'mobile':'pc'"> <div :class="isMobile?'mobile':'pc'">

View File

@@ -7,6 +7,7 @@
:surveyId="surveyId" :surveyId="surveyId"
:defaultWare="defaultWare" :defaultWare="defaultWare"
:isLocked="!!config.is_initialize" :isLocked="!!config.is_initialize"
:freezeRotY="!!config.is_default_perspective"
@onLoadingCompletion="onLoadingCompletion" @onLoadingCompletion="onLoadingCompletion"
@onFromSceneHoldToShelf="onFromSceneHoldToShelf" @onFromSceneHoldToShelf="onFromSceneHoldToShelf"
@onBehaviorFlush="onBehaviorFlush" @onBehaviorFlush="onBehaviorFlush"

View File

@@ -104,6 +104,14 @@
锁定初始位置 锁定初始位置
</ConfigCheckBox> </ConfigCheckBox>
</div> </div>
<div class="config-item">
<ConfigCheckBox
v-model:value="configTemp.is_default_perspective"
@changeValue="onUpdate"
>
固定默认视角
</ConfigCheckBox>
</div>
<div <div
class="config-item" class="config-item"
v-if=" v-if="
@@ -211,6 +219,7 @@
:sceneAction="sceneViewer.sceneAction" :sceneAction="sceneViewer.sceneAction"
:defaultWare="ware" :defaultWare="ware"
:isLocked="!!configTemp.is_initialize" :isLocked="!!configTemp.is_initialize"
:freezeRotY="!!configTemp.is_default_perspective"
@onLoadingCompletion="onLoadingCompletion" @onLoadingCompletion="onLoadingCompletion"
@onFromSceneHoldToShelf="onFromSceneHoldToShelf" @onFromSceneHoldToShelf="onFromSceneHoldToShelf"
/> />

View File

@@ -7,7 +7,7 @@
var target = null; var target = null;
export default { export default {
props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked", "hidden"], props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked", "freezeRotY", "hidden"],
data(){ data(){
return { return {
@@ -29,6 +29,7 @@ export default {
elCart: this.elCart, elCart: this.elCart,
defaultWare: this.defaultWare, defaultWare: this.defaultWare,
isLocked: this.isLocked, isLocked: this.isLocked,
freezeRotY: this.freezeRotY,
} }
}), '*'); }), '*');
return; return;
@@ -96,6 +97,7 @@ export default {
data: { data: {
defaultWare: this.defaultWare || null, defaultWare: this.defaultWare || null,
isLocked: this.isLocked, isLocked: this.isLocked,
freezeRotY: this.freezeRotY,
page: newVal, page: newVal,
} }
}), '*'); }), '*');

View File

@@ -6,7 +6,7 @@
import { SurveyViewer } from "@/views/planetDesign/SceneSurveyViewerPage/shelves.module.js"; import { SurveyViewer } from "@/views/planetDesign/SceneSurveyViewerPage/shelves.module.js";
export default { export default {
props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked"], props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked", "freezeRotY"],
mounted() { mounted() {
this.$nextTick(() => this.tryInitView()); this.$nextTick(() => this.tryInitView());
@@ -59,6 +59,7 @@ export default {
wareId: this.defaultWare?.planetid, wareId: this.defaultWare?.planetid,
keepHold: this.isLocked, keepHold: this.isLocked,
frostFarScene: this.isLocked, frostFarScene: this.isLocked,
freezeRotY: this.freezeRotY ? "0" : undefined,
}) })
}); });
} }

View File

@@ -13,7 +13,7 @@ import { SurveyViewer } from "./shelves.module";
import { debounce } from 'lodash-es'; import { debounce } from 'lodash-es';
export default { export default {
// props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked"], // props: ["surveyId", "shopData", "page", "sceneAction", "elCart", "defaultWare", "isLocked", "freezeRotY"],
data(){ data(){
return { return {
@@ -23,7 +23,9 @@ export default {
sceneAction: null, sceneAction: null,
elCart: null, elCart: null,
defaultWare: null, defaultWare: null,
isLocked: null, isLocked: null,
freezeRotY: false,
spinning: true, spinning: true,
@@ -133,6 +135,7 @@ export default {
wareId: this.defaultWare?.planetid, wareId: this.defaultWare?.planetid,
keepHold: this.isLocked, keepHold: this.isLocked,
frostFarScene: this.isLocked, frostFarScene: this.isLocked,
freezeRotY: this.freezeRotY ? "0" : undefined,
}) })
}); });
} }

File diff suppressed because one or more lines are too long