all
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view>
|
||||
<Header :index="index" :name="detail.name" v-if="!isMobile"></Header>
|
||||
<slot/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from './headerNo.vue';
|
||||
export default {
|
||||
props:{
|
||||
index:{
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
banner:{
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
img: {
|
||||
default: '',
|
||||
},
|
||||
imgs: {
|
||||
default: '',
|
||||
},
|
||||
titles: {
|
||||
default: '',
|
||||
},
|
||||
title_content: {
|
||||
default: '',
|
||||
},
|
||||
|
||||
},
|
||||
components:{
|
||||
Header,
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
detail:{
|
||||
name: '',
|
||||
},
|
||||
isMobile:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSet();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.checkIsMobile();
|
||||
window.addEventListener("resize", this.checkIsMobile);
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener("resize", this.checkIsMobile);
|
||||
},
|
||||
methods:{
|
||||
checkIsMobile() {
|
||||
const width = window.innerWidth;
|
||||
const height = window.innerHeight;
|
||||
const mobileWidth = 768; // 可以根据需要调整这个值
|
||||
this.isMobile = width <= mobileWidth || height <= mobileWidth;
|
||||
},
|
||||
// getData(){
|
||||
// this._get('cms.cms/index',{
|
||||
|
||||
// },res=>{
|
||||
// this.detail = res.data.data;
|
||||
// this.$emit('aboutData',this.detail);
|
||||
// })
|
||||
// }
|
||||
getSet(){
|
||||
this._get('game.index/setting',{
|
||||
},res=>{
|
||||
this.detail = res.data.set;
|
||||
// console.log(this.set,22)
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user