提交 ed12726a authored 作者: 王鹏飞's avatar 王鹏飞

fix: 移动端报名显示优化

上级 604ed11b
......@@ -53,7 +53,9 @@ export default {
},
{
name: '我要报名',
path: '/my/account'
onClick: () => {
window.open('/my/account')
}
}
]
}
......
......@@ -62,4 +62,7 @@ html {
color: #fff;
background-color: #35495e;
}
.main-layout.is-pc {
min-width: 1200px;
}
</style>
export default function(context) {
const UA = process.server ? context.req.headers['user-agent'] : navigator.userAgent
const isMobile = /iphone/i.test(UA) || (/android/i.test(UA) && /mobile/i.test(UA))
let isMobile = /iphone/i.test(UA) || (/android/i.test(UA) && /mobile/i.test(UA))
if (context.route.path.includes('/my')) {
isMobile = false
}
context.store.commit('setIsMobile', isMobile)
}
......@@ -12,7 +12,13 @@
</div>
</div>
</template>
<script>
export default {
head: {
meta: [{ hid: 'viewport', name: 'viewport', content: '' }]
}
}
</script>
<style lang="scss" scoped>
.layout {
max-width: 1200px;
......
......@@ -23,8 +23,7 @@ export default {
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ hid: 'viewport', name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
name: 'keywords',
content:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论