Authored by bevishuang

跳转流程

... ... @@ -19,13 +19,14 @@
<div class="right-content">
<Scroll>
<div v-for="(itemSub, index) in categorySubList" :key="index">
<p class="sub-title">————{{itemSub.name}}————</p>
<p class="sub-title">——— {{itemSub.name}} ———</p>
<div class="category-sub-root">
<div class="item-imge-div"
<div class="item-div"
v-for="(item, index) in itemSub.sub"
:key="index"
:data-id="item.id"
>
<div class="item-imge-div" @click="goProductList(item)">
<ImgSize
class="item-imge"
:src="item.image"
... ... @@ -33,6 +34,11 @@
:height="60"
/>
</div>
<!-- <div v-if="item.isShow" class="item-a-div"> -->
<a v-if="item.isShow" class="item-a-div" :href="item.link"></a>
<!-- </div> -->
</div>
</div>
</div>
</Scroll>
... ... @@ -75,6 +81,16 @@ export default {
}
}
},
goProductList(item) {
let key = item.linkType;
let value = item.id;
this.$router.push({
name: "List",
params: {
key : value
},
});
}
},
computed: {
...mapState(['categoryParent','categorySubList']),
... ... @@ -128,20 +144,30 @@ export default {
align-content: flex-start;
}
.sub-title{
/* background-color: brown; */
font-size: 24px;
color: #000;
text-align: center;
}
.item-imge-div {
.item-div {
position: relative;
display: flex;
flex: 0 0 33%;
height: 150px;
align-items: center;
justify-content: center;
}
.item-imge-div {
position:absolute;
z-index: 1;
}
.item-imge {
object-fit: contain;
}
.item-a-div{
position:absolute;
width: 100%;
height: 100%;
z-index: 99;
}
</style>
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<LayoutApp :show-back="true">
<Scroll :scrollEvents="['scroll']" :options="scrollOptions" @scroll="scroll"
@pulling-up="onPullingUp">
<ProductList :list="favoriteProductList"></ProductList>
<ProductList :list="favoriteProductList.list"></ProductList>
</Scroll>
</LayoutApp>
</template>
... ... @@ -49,12 +49,9 @@ export default {
}
}
},
computed: {
...mapState(['favoriteProductList']),
// getFa(){
// let length = this.favoriteProductList.product_list.lenght;
// console.log("length:"+length)
// },
},
};
</script>
... ...
<template>
<div class="notice-root">
<div class="notice-root" >
<p class="notice-content">【税率调整】您的商品AIR JORDAN 4 RESET PUSH NONEKJG 2017已经被用户下单,请及时发货</p>
<div class="time">
<time> 2018.08.08 17:20</time>
... ...
<template>
<div class="notice-root">
<a :href="data.url">
<p class="notice-content">{{data.name}}</p>
<div class="time">
<time> {{data.createTime}}</time>
</div>
<div class="item-split-line"/>
</a>
</div>
</template>
... ...
... ... @@ -29,6 +29,21 @@ export default function() {
addCategorySubList(state, {data}) {
if(data && data.category){
let subList = [];
data.category.forEach(val => {
if(val && val.sub){
val.sub.forEach(item => {
if(item.linkType === 'h5'){
item.isShow = true;
}else {
item.isShow = false;
}
})
}
// console.log(val)
// subList.push(val);
});
state.categorySubList = data.category;
}
},
... ... @@ -45,6 +60,7 @@ export default function() {
type: 1,//表示 品牌
linkType: '',
link: '',
isShow: false,
}
sub.push(subItem);
});
... ...
... ... @@ -10,11 +10,15 @@ export default function() {
page: 1,
pageTotal: 0,
recId: '',
favoriteProductList: [],
favoriteProductList: {
list:[]
},
},
mutations: {
addList(state, { data }) {
console.log(data)
if(data && data.product_list){
// data.product_list.
let list = state.favoriteProductList.list.concat(data.product_list);
Vue.set(state.favoriteProductList, "list", list);
}
... ...
... ... @@ -309,5 +309,4 @@ module.exports = {
depotNum: { type: Number, require: true }, // 鉴定中心id
},
},
}
};
... ...