Authored by yyq

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

<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']),
... ...
... ... @@ -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 {
... ... @@ -97,6 +99,7 @@ export default {
display: flex;
flex-direction: column;
background-color: #fff;
box-sizing: border-box;
.layout-context {
flex: 1;
... ...
<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">
... ... @@ -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 {
... ...
<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>
... ... @@ -169,7 +169,7 @@ export default {
const {url = ''} = firstNav;
this.selectedCategory = queryString.parse(url);
}
this.refreshProductList(this.active);
},
methods: {
... ... @@ -442,12 +442,21 @@ export default {
}
.scroll-nav-wrap {
position: relative;
background-color: #fefefe;
&:after {
content: "";
position: absolute;
width: 100%;
height: 100px;
box-shadow: 0 0 120px 100px #f2f2f2 !important;
z-index: -1;
}
&.fixed-nav {
width: 100%;
position: absolute;
z-index: 10;
background-color: #fefefe;
overflow: hidden;
}
}
... ...
... ... @@ -103,13 +103,9 @@ export default {
background-color: white;
}
@supports (bottom: env(safe-area-inset-bottom)) {
.content {
height: calc(env(safe-area-inset-bottom) + 100% + 88px);
}
/*@supports (bottom: env(safe-area-inset-bottom)) {
.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">
... ...
... ... @@ -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 {
... ...