|
@@ -1,12 +1,22 @@
|
|
<template>
|
|
<template>
|
|
- <div class='Layout'>
|
|
|
|
-
|
|
|
|
|
|
+ <div class="Layout">
|
|
<!-- 底部固定栏 -->
|
|
<!-- 底部固定栏 -->
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
- <div class="row" @click="$router.push(item.path).catch(() => { })" v-for="item in data" :key="item.id">
|
|
|
|
- <img :src="require(`@/assets/img/layout/inco${item.id}${item.id === $route.meta.myInd ? 'Ac' : ''}.png`)" alt="">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="row"
|
|
|
|
+ @click="toUrl(item.path)"
|
|
|
|
+ v-for="item in data"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ :src="
|
|
|
|
+ require(`@/assets/img/layout/inco${item.id}${
|
|
|
|
+ item.id === $route.meta.myInd ? 'Ac' : ''
|
|
|
|
+ }.png`)
|
|
|
|
+ "
|
|
|
|
+ alt=""
|
|
|
|
+ />
|
|
<p>{{ item.name }}</p>
|
|
<p>{{ item.name }}</p>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -15,38 +25,37 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-
|
|
|
|
export default {
|
|
export default {
|
|
components: {},
|
|
components: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
data: [
|
|
data: [
|
|
- { id: 1, path: '/layout/list', name: '建筑可阅读' },
|
|
|
|
- { id: 2, path: '/layout/serve', name: '建筑可游玩' },
|
|
|
|
- { id: 3, path: '/layout/interact', name: '建筑可对话' },
|
|
|
|
- { id: 4, path: '/layout/my', name: '我的' },
|
|
|
|
- ]
|
|
|
|
|
|
+ { id: 1, path: "/layout/list", name: "建筑可阅读" },
|
|
|
|
+ { id: 2, path: "/layout/serve", name: "建筑可游玩" },
|
|
|
|
+ { id: 3, path: "/layout/interact", name: "建筑可对话" },
|
|
|
|
+ { id: 4, path: "/layout/my", name: "我的" },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
watch: {},
|
|
watch: {},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
- },
|
|
|
|
- created() {
|
|
|
|
-
|
|
|
|
|
|
+ toUrl(url) {
|
|
|
|
+ const href = window.location.href
|
|
|
|
+ if(href.includes('?code')) window.location.href = `/web/index.html#${url}`;
|
|
|
|
+ else this.$router.push(url)
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- beforeCreate() { }, //生命周期 - 创建之前
|
|
|
|
- beforeMount() { }, //生命周期 - 挂载之前
|
|
|
|
- beforeUpdate() { }, //生命周期 - 更新之前
|
|
|
|
- updated() { }, //生命周期 - 更新之后
|
|
|
|
- beforeDestroy() { }, //生命周期 - 销毁之前
|
|
|
|
- destroyed() { }, //生命周期 - 销毁完成
|
|
|
|
- activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
-}
|
|
|
|
|
|
+ created() {},
|
|
|
|
+ mounted() {},
|
|
|
|
+ beforeCreate() {}, //生命周期 - 创建之前
|
|
|
|
+ beforeMount() {}, //生命周期 - 挂载之前
|
|
|
|
+ beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
|
+ updated() {}, //生命周期 - 更新之后
|
|
|
|
+ beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
|
+ destroyed() {}, //生命周期 - 销毁完成
|
|
|
|
+ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<style lang='less' scoped>
|
|
<style lang='less' scoped>
|
|
.Layout {
|
|
.Layout {
|
|
@@ -65,18 +74,17 @@ export default {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- .row{
|
|
|
|
|
|
+ .row {
|
|
width: 25%;
|
|
width: 25%;
|
|
text-align: center;
|
|
text-align: center;
|
|
- &>img{
|
|
|
|
|
|
+ & > img {
|
|
width: 30px;
|
|
width: 30px;
|
|
}
|
|
}
|
|
- &>p{
|
|
|
|
|
|
+ & > p {
|
|
margin-top: 5px;
|
|
margin-top: 5px;
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|