Authored by Tao

modify bug

@@ -18,6 +18,10 @@ export default { @@ -18,6 +18,10 @@ export default {
18 console.log(newVal); 18 console.log(newVal);
19 } 19 }
20 }, 20 },
  21 + // activated() {
  22 + // console.log(this.report);
  23 + // console.log("this.report");
  24 + // },
21 methods: { 25 methods: {
22 jumpTo() { 26 jumpTo() {
23 if (!this.href) { 27 if (!this.href) {
@@ -17,9 +17,9 @@ @@ -17,9 +17,9 @@
17 <input class="search-input" type="search" disabled="true" placeholder="搜索商品名称或货号"/> 17 <input class="search-input" type="search" disabled="true" placeholder="搜索商品名称或货号"/>
18 </div> 18 </div>
19 <template v-for="(item, index) in channelList.list"> 19 <template v-for="(item, index) in channelList.list">
20 - <Swiper :list="item" :index="index" :key="index" v-if="item.template_name == 'threePicture'"/>  
21 - <Hot :list="item.data" :key="index" v-if="item.template_name == 'image_list'"/>  
22 - <Banner :list="item.data" :key="index" v-if="item.template_name == 'single_image'"/> 20 + <Swiper :list="item.data" :index="index" :key="index" v-if="item.template_name == 'threePicture'"/>
  21 + <Hot :list="item.data" :index="index" :key="index" v-if="item.template_name == 'image_list'"/>
  22 + <Banner :list="item.data" :index="index" :key="index" v-if="item.template_name == 'single_image'"/>
23 <TwoBanner :list="item.data" :key="index" v-if="item.template_name == 'twoPicture'"/> 23 <TwoBanner :list="item.data" :key="index" v-if="item.template_name == 'twoPicture'"/>
24 </template> 24 </template>
25 </div> 25 </div>
@@ -139,6 +139,7 @@ export default { @@ -139,6 +139,7 @@ export default {
139 this.$refs.scroll.scrollTo(0, -this.navTop, 300); 139 this.$refs.scroll.scrollTo(0, -this.navTop, 300);
140 }, 140 },
141 scrollHandler({ y }) { 141 scrollHandler({ y }) {
  142 +
142 if (this.navTop) { 143 if (this.navTop) {
143 let scrollY = -y; 144 let scrollY = -y;
144 145
@@ -73,7 +73,8 @@ export default { @@ -73,7 +73,8 @@ export default {
73 } 73 }
74 74
75 .cube-scroll-content { 75 .cube-scroll-content {
76 - display: block; 76 + // https://blog.csdn.net/qq_24331363/article/details/88026777
  77 + // display: block;
77 } 78 }
78 79
79 .cube-scroll-nav-bar-item { 80 .cube-scroll-nav-bar-item {
1 <template> 1 <template>
2 - <div class="swiper" v-if="list.data && list.data.length > 0"> 2 + <div class="swiper" v-if="list && list.length > 0">
3 <div class="swiper-item swiper-item-left"> 3 <div class="swiper-item swiper-item-left">
4 - <LayoutLink :href="list.data[0].url" class="img-link" :report="{...params, I_INDEX: 1, F_URL: list.data[0].url}">  
5 - <ImageFormat :lazy="false" class="item-imge" :src="list.data[0].src" :width="310" :height="402"></ImageFormat> 4 + <LayoutLink :href="list[0].url" class="img-link">
  5 + <ImageFormat :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
6 </LayoutLink> 6 </LayoutLink>
7 </div> 7 </div>
8 <div class="swiper-item swiper-item-right"> 8 <div class="swiper-item swiper-item-right">
9 - <LayoutLink :href="list.data[1].url" class="img-link" :report="{...params, I_INDEX: 2, F_URL: list.data[1].url}">  
10 - <ImageFormat :lazy="false" class="item-imge" :src="list.data[1].src" :width="380" :height="196"></ImageFormat> 9 + <LayoutLink :href="list[1].url" class="img-link">
  10 + <ImageFormat :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
11 </LayoutLink> 11 </LayoutLink>
12 - <LayoutLink :href="list.data[2].url" class="img-link" :report="{...params, I_INDEX: 3, F_URL: list.data[2].url}">  
13 - <ImageFormat :lazy="false" class="item-imge" :src="list.data[2].src" :width="380" :height="196"></ImageFormat> 12 + <LayoutLink :href="list[2].url" class="img-link">
  13 + <ImageFormat :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
14 </LayoutLink> 14 </LayoutLink>
15 </div> 15 </div>
16 </div> 16 </div>
@@ -21,33 +21,8 @@ export default { @@ -21,33 +21,8 @@ export default {
21 name: 'swiper', 21 name: 'swiper',
22 props: { 22 props: {
23 list: { 23 list: {
24 - type: Object, 24 + type: Array,
25 }, 25 },
26 - index: {  
27 - type: Number,  
28 - }  
29 - },  
30 - data() {  
31 - return {  
32 - params: {},  
33 - }  
34 - },  
35 - mounted() {  
36 - console.log(this.list)  
37 - },  
38 - activated() {  
39 - let { template_id, template_name } = this.list;  
40 - let PAGE_URL = window.location.href;  
41 - let F_INDEX = this.index + 1;  
42 - let params = {  
43 - P_NAME: 'XY_UFOHome',  
44 - P_PARAM: 'cfcd8de156d3edc26c84091804c43e23',  
45 - F_ID: template_id,  
46 - PAGE_URL,  
47 - F_INDEX,  
48 - F_NAME: template_name,  
49 - }  
50 - this.params = params;  
51 }, 26 },
52 methods: { 27 methods: {
53 28
@@ -34,6 +34,11 @@ export default function() { @@ -34,6 +34,11 @@ export default function() {
34 Vue.set(state.channelList, 'productlist', state.channelList.productlist.concat(productlist.product_list)); 34 Vue.set(state.channelList, 'productlist', state.channelList.productlist.concat(productlist.product_list));
35 Vue.set(state.channelList, 'page', productlist.page); 35 Vue.set(state.channelList, 'page', productlist.page);
36 }, 36 },
  37 + addReport(state, {report}) {
  38 + console.log(state);
  39 + console.log(report);
  40 + console.log("++++++++");
  41 + },
37 }, 42 },
38 actions: { 43 actions: {
39 async fetchProductList({ commit, state }, obj) { 44 async fetchProductList({ commit, state }, obj) {