Authored by 邱骏

iphoneX适配

... ... @@ -21,7 +21,12 @@ export default {
}
},
windowHeight() {
return window.innerHeight + 'px';
if (typeof window !== 'undefined') {
console.log(window);
return window.innerHeight + 'px';
} else {
return '100%';
}
}
},
mounted() {
... ...
... ... @@ -2,6 +2,7 @@
<div
ref="layout"
class="layout"
:class="noSafeArea ? 'no-safe-area': ''"
@touchstart="webviewScrollStart"
@touchmove="webviewScrollMove"
@touchend="webviewScrollEnd">
... ... @@ -50,7 +51,8 @@ export default {
isStop: {
type: Boolean,
default: false
}
},
noSafeArea: Boolean
},
data() {
return {
... ...
... ... @@ -15,7 +15,7 @@ export default {
reportEvent: String,
},
watch: {
'report': function(newVal) {
report: function(newVal) {
},
},
methods: {
... ... @@ -29,12 +29,14 @@ export default {
url: this.href
});
this.$store.dispatch('reportYas', {
params: {
appop: this.reportEvent,
param:this.report
}
});
if (this.reportEvent) {
this.$store.dispatch('reportYas', {
params: {
appop: this.reportEvent,
param: this.report
}
});
}
}
}
};
... ...
<template>
<LayoutApp :title="title" >
<LayoutApp :title="title" :no-safe-area="true" >
<div ref="wrapper" class="activity-wrapper">
<div class="activity-container">
<ul id="page_ul">
... ...
<template>
<LayoutApp title="秒杀AJ" :show-back="true" :back-action="goBack">
<LayoutApp title="秒杀AJ" :show-back="true" :no-safe-area="true" :back-action="goBack">
<ul>
<li v-for="(item, index) in productList" :key="index">
<div v-if="item.urls && item.urls.length > 0" class="link-container">
... ...
<template>
<LayoutApp :show-back="true" :hideHeader="hideHeader">
<LayoutApp :show-back="true" :hideHeader="hideHeader" :no-safe-area="true">
<div class="root-content">
<div class="left-content">
<Scroll>
... ...
<template>
<LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title">
<LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title" :no-safe-area="true">
<div class="fixed-nav scroll-nav-wrap" :class="{'hidden': !isShow}" v-if="navList.length">
<ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav>
</div>
... ...
... ... @@ -11,8 +11,9 @@
<script>
import { createNamespacedHelpers } from 'vuex';
const { mapState, mapActions } = createNamespacedHelpers('home/channel');
import { createNamespacedHelpers, mapState} from 'vuex';
const { mapState: mapChannelState, mapActions } = createNamespacedHelpers('home/channel');
import Widget from './widget';
export default {
... ... @@ -34,16 +35,23 @@ export default {
};
};
},
...mapState(['showMsg'])
...mapChannelState(['showMsg']),
...mapState(['yoho'])
},
activated() {
this.getAllInboxCatInfo();
this.$sdk.getUser().then(user => {
if (user.uid) {
this.getAllInboxCatInfo();
}
});
},
watch: {
'yoho.context.isLogin': function(val) {
if (val) {
this.getAllInboxCatInfo();
}
}
},
// watch: {
// 'showMsg':function(sss) {
// console.log(sss);
// }
// },
methods: {
...mapActions(['getAllInboxCatInfo']),
onClick(index) {
... ...
... ... @@ -102,14 +102,4 @@ export default {
width: 100%;
background-color: white;
}
@supports (bottom: env(safe-area-inset-bottom)) {
.content {
height: calc(env(safe-area-inset-bottom) + 100% + 88px);
}
.footer {
height: calc(env(safe-area-inset-bottom) + 100px);
}
}
</style>
... ...
<template>
<LayoutApp :show-back="true" title="我的" :hideHeader="hideHeader">
<LayoutApp :show-back="true" title="我的" :no-safe-area="true" :hideHeader="hideHeader">
<div class="body" ref="body">
<div v-for="(value, key) in getMineList" :key="key">
<tab-item v-if="key === 'board'" :data="value" noLine icon="cubeic-notification" small grey>
... ...
<template>
<LayoutApp :show-back="true" :hideHeader="hideHeader">
<LayoutApp :show-back="true" :hideHeader="hideHeader" :no-safe-area="true">
<div class="scroll-list-wrap">
<LayoutScroll
ref="scroll"
... ...
<template>
<LayoutApp title="闲鱼潮玩转攻略" :show-back="true" :back-action="goBack">
<LayoutApp title="闲鱼潮玩转攻略" :show-back="true" :no-safe-area="true" :back-action="goBack">
<div class="body-warpper">
<ul>
<li v-for="(item, index) in dataList" :key="index">
... ...
... ... @@ -113,10 +113,10 @@ export default {
this.setYasParam({param: params, tab: {index: 1, name: '人气'}});
!params.order && (params.order = 'sale_desc');
await this.fetchList({...params, isReset: true});
this.$refs.product.yasShowEvent(0);
} else {
this.scrollY && this.$refs.scroll.scrollTo(this.scrollY);
}
this.$refs.product.yasShowEvent(0);
this.yasShowPage();
},
... ...
... ... @@ -64,6 +64,8 @@ export default {
next(vm => {
if (from.name === 'List') {
vm.SEARCH_POS = 3;
} else if (from.name === 'ChannelPage') {
vm.SEARCH_POS = 1;
}
});
},
... ...
... ... @@ -554,11 +554,14 @@ 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);
}
.layout.no-safe-area {
padding-bottom: 0;
}
}
/* stylelint-disable */
::-webkit-scrollbar {
... ...