Authored by Tao

modify bug

... ... @@ -18,6 +18,10 @@ export default {
console.log(newVal);
}
},
// activated() {
// console.log(this.report);
// console.log("this.report");
// },
methods: {
jumpTo() {
if (!this.href) {
... ...
... ... @@ -17,9 +17,9 @@
<input class="search-input" type="search" disabled="true" placeholder="搜索商品名称或货号"/>
</div>
<template v-for="(item, index) in channelList.list">
<Swiper :list="item" :index="index" :key="index" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data" :key="index" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" :key="index" v-if="item.template_name == 'single_image'"/>
<Swiper :list="item.data" :index="index" :key="index" v-if="item.template_name == 'threePicture'"/>
<Hot :list="item.data" :index="index" :key="index" v-if="item.template_name == 'image_list'"/>
<Banner :list="item.data" :index="index" :key="index" v-if="item.template_name == 'single_image'"/>
<TwoBanner :list="item.data" :key="index" v-if="item.template_name == 'twoPicture'"/>
</template>
</div>
... ... @@ -139,6 +139,7 @@ export default {
this.$refs.scroll.scrollTo(0, -this.navTop, 300);
},
scrollHandler({ y }) {
if (this.navTop) {
let scrollY = -y;
... ...
... ... @@ -73,7 +73,8 @@ export default {
}
.cube-scroll-content {
display: block;
// https://blog.csdn.net/qq_24331363/article/details/88026777
// display: block;
}
.cube-scroll-nav-bar-item {
... ...
<template>
<div class="swiper" v-if="list.data && list.data.length > 0">
<div class="swiper" v-if="list && list.length > 0">
<div class="swiper-item swiper-item-left">
<LayoutLink :href="list.data[0].url" class="img-link" :report="{...params, I_INDEX: 1, F_URL: list.data[0].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[0].src" :width="310" :height="402"></ImageFormat>
<LayoutLink :href="list[0].url" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
</LayoutLink>
</div>
<div class="swiper-item swiper-item-right">
<LayoutLink :href="list.data[1].url" class="img-link" :report="{...params, I_INDEX: 2, F_URL: list.data[1].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[1].src" :width="380" :height="196"></ImageFormat>
<LayoutLink :href="list[1].url" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
<LayoutLink :href="list.data[2].url" class="img-link" :report="{...params, I_INDEX: 3, F_URL: list.data[2].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[2].src" :width="380" :height="196"></ImageFormat>
<LayoutLink :href="list[2].url" class="img-link">
<ImageFormat :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
</div>
</div>
... ... @@ -21,33 +21,8 @@ export default {
name: 'swiper',
props: {
list: {
type: Object,
type: Array,
},
index: {
type: Number,
}
},
data() {
return {
params: {},
}
},
mounted() {
console.log(this.list)
},
activated() {
let { template_id, template_name } = this.list;
let PAGE_URL = window.location.href;
let F_INDEX = this.index + 1;
let params = {
P_NAME: 'XY_UFOHome',
P_PARAM: 'cfcd8de156d3edc26c84091804c43e23',
F_ID: template_id,
PAGE_URL,
F_INDEX,
F_NAME: template_name,
}
this.params = params;
},
methods: {
... ...
... ... @@ -34,6 +34,11 @@ export default function() {
Vue.set(state.channelList, 'productlist', state.channelList.productlist.concat(productlist.product_list));
Vue.set(state.channelList, 'page', productlist.page);
},
addReport(state, {report}) {
console.log(state);
console.log(report);
console.log("++++++++");
},
},
actions: {
async fetchProductList({ commit, state }, obj) {
... ...