Authored by shuaiguo

Merge branch 'feature/ufo-activitys' into 'develop'

iphoneX适配



See merge request !9
<template>
<div id="app">
<div id="app" :style="{height: windowHeight }">
<keep-alive :max="20">
<router-view :key="routerViewKey"></router-view>
</keep-alive>
... ... @@ -11,6 +11,11 @@ import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'App',
data() {
return {
windowHeight: '100%',
};
},
computed: {
...mapState(['yoho']),
routerViewKey() {
... ... @@ -19,7 +24,7 @@ export default {
} else {
return this.$route.fullPath;
}
},
}
},
mounted() {
if (this.yoho.context.needLogin) {
... ... @@ -41,13 +46,22 @@ export default {
});
this.getZkConfig();
if (typeof window !== 'undefined') {
if (window.screen.availHeight - window.innerHeight > 100) {
this.windowHeight = (window.screen.availHeight - 88) + 'px';
} else {
this.windowHeight = window.innerHeight + 'px';
}
} else {
this.windowHeight = '100%';
}
},
watch: {
'yoho.context.needLogin': function(newVal) {
if (newVal) {
this.$yoho.auth({ needLogin: newVal });
}
},
}
},
methods: {
...mapMutations(['SET_LOGIN_INFO']),
... ...
... ... @@ -99,6 +99,7 @@ export default {
display: flex;
flex-direction: column;
background-color: #fff;
box-sizing: border-box;
.layout-context {
flex: 1;
... ...
... ... @@ -66,7 +66,6 @@ export default {
rule: productData.imageList[0].rule,
more: productData.imageList[0].more
};
console.log(this.productList)
}
};
</script>
... ... @@ -74,13 +73,15 @@ export default {
<style lang="scss" scoped>
ul {
width: 100%;
height: 100%;
list-style: none;
margin: 0;
padding: 0;
background-image: url("//ad.yoho.cn/html5/2019/10/activity/008/base/repeat_bg.jpg?imageslim");
background-repeat: repeat-y;
background-size: 100% auto;
overflow: hidden;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
li {
... ...
... ... @@ -102,4 +102,10 @@ export default {
width: 100%;
background-color: white;
}
/*@supports (bottom: env(safe-area-inset-bottom)) {
.footer {
height: calc(env(safe-area-inset-bottom) + 100px);
}
}*/
</style>
... ...
... ... @@ -554,10 +554,6 @@ body {
margin-bottom: env(safe-area-inset-bottom);
}
#app {
height: calc(100% + env(safe-area-inset-bottom));
}
.layout {
padding-bottom: env(safe-area-inset-bottom);
}
... ... @@ -566,7 +562,6 @@ body {
padding-bottom: 0;
}
}
/* stylelint-disable */
::-webkit-scrollbar {
... ...