|
@@ -1,6 +1,8 @@
|
|
|
-import { defineComponent, ref } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, ref, watch } from 'vue';
|
|
|
import { homeApi } from '@/api';
|
|
import { homeApi } from '@/api';
|
|
|
import SharePopup from '../share-popup/index.vue';
|
|
import SharePopup from '../share-popup/index.vue';
|
|
|
|
|
+import ChapterPopup from '../chapter-popup/index.vue';
|
|
|
|
|
+import AntPopup from '../ant-popup/index.vue';
|
|
|
import './index.pb.scss';
|
|
import './index.pb.scss';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
@@ -14,11 +16,18 @@ export default defineComponent({
|
|
|
type: Function,
|
|
type: Function,
|
|
|
required: true,
|
|
required: true,
|
|
|
},
|
|
},
|
|
|
|
|
+ manageJsLoaded: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
setup(props) {
|
|
setup(props) {
|
|
|
const isSimpleMode = ref(false);
|
|
const isSimpleMode = ref(false);
|
|
|
const shareVisible = ref(false);
|
|
const shareVisible = ref(false);
|
|
|
|
|
+ const chapterVisible = ref(false);
|
|
|
|
|
+ const antVisible = ref(false);
|
|
|
const animationThumb = ref(false);
|
|
const animationThumb = ref(false);
|
|
|
|
|
+ const isMobile = ref(false);
|
|
|
|
|
|
|
|
const toggleSimpleMode = (on?: boolean) => {
|
|
const toggleSimpleMode = (on?: boolean) => {
|
|
|
const next = typeof on === 'boolean' ? on : !isSimpleMode.value;
|
|
const next = typeof on === 'boolean' ? on : !isSimpleMode.value;
|
|
@@ -35,17 +44,32 @@ export default defineComponent({
|
|
|
|
|
|
|
|
animationThumb.value = true;
|
|
animationThumb.value = true;
|
|
|
homeApi.saveStar(window.number);
|
|
homeApi.saveStar(window.number);
|
|
|
- props.handleLikeCounter(props.likeCount + 1);
|
|
|
|
|
|
|
+ props.handleLikeCounter();
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
animationThumb.value = false;
|
|
animationThumb.value = false;
|
|
|
}, 200);
|
|
}, 200);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ watch(
|
|
|
|
|
+ () => props.manageJsLoaded,
|
|
|
|
|
+ (v) => {
|
|
|
|
|
+ if (v) {
|
|
|
|
|
+ isMobile.value = window.browser.isMobile();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ immediate: true,
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
|
|
+ isMobile,
|
|
|
isSimpleMode,
|
|
isSimpleMode,
|
|
|
shareVisible,
|
|
shareVisible,
|
|
|
|
|
+ antVisible,
|
|
|
animationThumb,
|
|
animationThumb,
|
|
|
|
|
+ chapterVisible,
|
|
|
handleThumb,
|
|
handleThumb,
|
|
|
toggleSimpleMode,
|
|
toggleSimpleMode,
|
|
|
};
|
|
};
|
|
@@ -60,7 +84,7 @@ export default defineComponent({
|
|
|
<img src="images/pb/play.png" width="24" height="24" data-original-title="播放" />
|
|
<img src="images/pb/play.png" width="24" height="24" data-original-title="播放" />
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-tooltip content="播放" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="播放" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div id="play" class="ui-icon">
|
|
<div id="play" class="ui-icon">
|
|
|
<a>
|
|
<a>
|
|
|
<img src="images/pb/play.png" width="24" height="24" />
|
|
<img src="images/pb/play.png" width="24" height="24" />
|
|
@@ -77,7 +101,7 @@ export default defineComponent({
|
|
|
<i title="" class="icon icon-dpad-right" data-original-title="下一个"></i>
|
|
<i title="" class="icon icon-dpad-right" data-original-title="下一个"></i>
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-tooltip content="导览" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="导览" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div id="pullTab" title="">
|
|
<div id="pullTab" title="">
|
|
|
<img
|
|
<img
|
|
|
class="icon icon-inside"
|
|
class="icon icon-inside"
|
|
@@ -89,7 +113,7 @@ export default defineComponent({
|
|
|
</div>
|
|
</div>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
<div id="hotList" title="" style="display: none">
|
|
<div id="hotList" title="" style="display: none">
|
|
|
- <el-tooltip content="热点列表" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="热点列表" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<img class="icon icon-inside" src="images/pb/hotlist.png" title="热点列表" />
|
|
<img class="icon icon-inside" src="images/pb/hotlist.png" title="热点列表" />
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
@@ -102,7 +126,7 @@ export default defineComponent({
|
|
|
>
|
|
>
|
|
|
<img class="icon icon-inside" src="images/inside.png" title="全景漫游" />
|
|
<img class="icon icon-inside" src="images/inside.png" title="全景漫游" />
|
|
|
</div>
|
|
</div>
|
|
|
- <el-tooltip content="迷你模型" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="迷你模型" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div id="gui-modes-dollhouse" title="" class="">
|
|
<div id="gui-modes-dollhouse" title="" class="">
|
|
|
<img class="icon icon-inside" src="images/pb/model.png" title="迷你模型" />
|
|
<img class="icon icon-inside" src="images/pb/model.png" title="迷你模型" />
|
|
|
</div>
|
|
</div>
|
|
@@ -115,13 +139,18 @@ export default defineComponent({
|
|
|
>
|
|
>
|
|
|
<img class="icon icon-inside" src="images/floor.png" title="俯视图" />
|
|
<img class="icon icon-inside" src="images/floor.png" title="俯视图" />
|
|
|
</div>
|
|
</div>
|
|
|
- <el-tooltip content="展品列表" show-arrow={false} offset={5}>
|
|
|
|
|
- <div id="gui-modes-antlist" title="" class="">
|
|
|
|
|
|
|
+ <el-tooltip content="展品列表" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
|
|
+ <div
|
|
|
|
|
+ id="gui-modes-antlist"
|
|
|
|
|
+ title=""
|
|
|
|
|
+ class=""
|
|
|
|
|
+ onClick={() => (this.antVisible = true)}
|
|
|
|
|
+ >
|
|
|
<img class="icon icon-inside" src="images/pb/antlist.png" title="展品列表" />
|
|
<img class="icon icon-inside" src="images/pb/antlist.png" title="展品列表" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- <el-tooltip content="章节列表" show-arrow={false} offset={5}>
|
|
|
|
|
- <div id="gui-modes-chapter" title="" class="">
|
|
|
|
|
|
|
+ <el-tooltip content="章节列表" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
|
|
+ <div id="gui-modes-chapter" onClick={() => (this.chapterVisible = true)}>
|
|
|
<img class="icon icon-inside" src="images/pb/chapter.png" title="章节列表" />
|
|
<img class="icon icon-inside" src="images/pb/chapter.png" title="章节列表" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -135,12 +164,12 @@ export default defineComponent({
|
|
|
<div class="icon icon-slot" title="点赞" />
|
|
<div class="icon icon-slot" title="点赞" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- <el-tooltip content="分享" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="分享" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div id="sharing" onClick={() => (this.shareVisible = true)}>
|
|
<div id="sharing" onClick={() => (this.shareVisible = true)}>
|
|
|
<img class="icon icon-inside" src="images/pb/share.png" title="分享" />
|
|
<img class="icon icon-inside" src="images/pb/share.png" title="分享" />
|
|
|
</div>
|
|
</div>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- <el-tooltip content="全屏" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="全屏" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div
|
|
<div
|
|
|
id="gui-fullscreen"
|
|
id="gui-fullscreen"
|
|
|
class="ui-icon wide"
|
|
class="ui-icon wide"
|
|
@@ -163,7 +192,7 @@ export default defineComponent({
|
|
|
<img class="icon icon-fullscreen-exit" src="images/pb/narrow_off.png" />
|
|
<img class="icon icon-fullscreen-exit" src="images/pb/narrow_off.png" />
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <el-tooltip content="清屏" show-arrow={false} offset={5}>
|
|
|
|
|
|
|
+ <el-tooltip content="清屏" show-arrow={false} offset={5} disabled={this.isMobile}>
|
|
|
<div onClick={() => this.toggleSimpleMode(true)}>
|
|
<div onClick={() => this.toggleSimpleMode(true)}>
|
|
|
<img class="icon icon-inside" src="images/pb/simple.png" title="清屏" />
|
|
<img class="icon icon-inside" src="images/pb/simple.png" title="清屏" />
|
|
|
</div>
|
|
</div>
|
|
@@ -208,6 +237,11 @@ export default defineComponent({
|
|
|
退出清屏
|
|
退出清屏
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <AntPopup visible={this.antVisible} onUpdate:visible={(v) => (this.antVisible = v)} />
|
|
|
|
|
+ <ChapterPopup
|
|
|
|
|
+ visible={this.chapterVisible}
|
|
|
|
|
+ onUpdate:visible={(v) => (this.chapterVisible = v)}
|
|
|
|
|
+ />
|
|
|
<SharePopup visible={this.shareVisible} onUpdate:visible={(v) => (this.shareVisible = v)} />
|
|
<SharePopup visible={this.shareVisible} onUpdate:visible={(v) => (this.shareVisible = v)} />
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|