-
Notifications
You must be signed in to change notification settings - Fork 0
/
mexplore.vue
111 lines (101 loc) · 2.09 KB
/
mexplore.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<template>
<view class="mobilebg">
<view class="newbg">
<mobile-nav></mobile-nav>
</view>
<view class="content_1_bg">
<image src="/static/index/search.svg" class="search"></image>
<view class="_title">EXPLORE</view>
<view class="_desc">
You can play the DEMO in a WEB browser
while the application page is being rebuilt
</view>
</view>
<view class="_position">
<mobile-bottom></mobile-bottom>
</view>
</view>
</template>
<script>
import mobileBottom from '@/components/mobilebottom.vue';
import mobileNav from '@/components/mobilenav.vue';
export default {
components: {
mobileBottom,
mobileNav
},
data() {
return {
screenWidth: null
};
},
watch: {
//监听页面屏幕宽度
screenWidth: function(n, o) {
if (n >= 1150) {
uni.reLaunch({
url: '/marketplace'
})
console.log('屏幕宽度大于1150了')
}
}
},
mounted() {
let that = this;
//网页可见区域宽
that.screenWidth = document.body.clientWidth;
//使用window.onresize方法获取屏幕尺寸;
window.onresize = () => {
return (() => {
that.screenWidth = document.body.clientWidth;
})()
}
},
}
</script>
<style scoped lang="scss">
.mobilebg {
background-color: #fff;
font-size: 16px;
color: #000000;
._position{
position: fixed;
bottom: 0;
width: 100%;
height: auto;
}
.newbg {
background: #FFE1B4;
height: 0.8rem;
}
.content_1_bg {
width: 90%;
max-width: 750px;
margin: .6rem auto .6rem;
height: auto;
overflow: hidden;
background-color: #fff;
text-align: center;
.search {
margin-top: .4rem;
width: 1.2rem;
height: .9rem;
}
._title {
font-size: 24px;
font-family: Alibaba PuHuiTi;
font-weight: 800;
text-align: center;
}
._desc {
width: 100%;
max-width: 375px;
line-height: .3rem;
font-family: PingFang SC;
font-weight: 400;
text-align: center;
margin: .3rem auto .4rem;
}
}
}
</style>