Authored by yyq

Merge branch 'master' of git.yoho.cn:fe/yoho-community-web

... ... @@ -17,6 +17,8 @@
</template>
<script>
import {mapState} from 'vuex';
export default {
name: 'LayoutHeader',
props: {
... ... @@ -29,6 +31,9 @@ export default {
default: 1
}
},
computed: {
...mapState(['yoho'])
},
watch: {
transparentSeek(value) {
this.animeEl && this.animeEl.seek(this.animeEl.duration * value);
... ... @@ -48,7 +53,11 @@ export default {
},
methods: {
onBack() {
this.$router.go(-1);
if (this.yoho.ssrLoad) {
this.$yoho.finishPage({});
} else {
this.$router.go(-1);
}
}
}
};
... ...
<template>
<div
class="product-item"
:class="{single}"
@click="onClick"
>
:class="{single}">
<div class="product-content">
<ImageFormat :lazy="lazy" class="product-image" :src="product.productImage" :width="136" :height="180"></ImageFormat>
<div class="product-info">
... ... @@ -97,11 +95,11 @@ export default {
white-space: initial;
&:last-child {
margin-right: 30px;
margin-right: 50px;
}
&.single {
width: 690px;
width: 670px;
}
}
... ...
... ... @@ -145,6 +145,7 @@ export default {
padding-top: 0;
padding-bottom: 0;
margin: 40px 0;
overflow: initial;
}
/deep/ .product-item {
... ...
... ... @@ -9,7 +9,6 @@ export function createRouter() {
mode: 'history',
routes,
scrollBehavior(to, from, savedPosition) {
console.log(to.name)
if (savedPosition) {
return savedPosition;
} else {
... ...
... ... @@ -26,6 +26,7 @@ export default function() {
},
historys: [],
direction: 'forword',
ssrLoad: true, // 是否是ssr直出的页面
},
mutations: {
[Types.SET_ENV](state, {context}) {
... ... @@ -39,6 +40,7 @@ export default function() {
state.context.title = title;
},
[Types.ROUTE_CHANGE](state, {to, from}) {
state.ssrLoad = false;
if (!state.historys.length) {
state.historys.push({
name: from.name,
... ...