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

fix: 移动端报名显示优化

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