mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 05:19:49 +08:00
【修复】修复页面设计【图片】组件命名问题,导致调用失败的问题。【修复】修复APP下首页商品组件【coreshop-goods】滚动异常的情况。
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 横向滚动 -->
|
<!-- 横向滚动 -->
|
||||||
<block v-if="coreshopdata.parameters.column == '2' && coreshopdata.parameters.display == 'slide' || coreshopdata.parameters.column == '3' && coreshopdata.parameters.display == 'slide'"
|
<block v-if="coreshopdata.parameters.display == 'slide'"
|
||||||
v-bind:class="'slide'+coreshopdata.parameters.column">
|
v-bind:class="'slide'+coreshopdata.parameters.column">
|
||||||
<view class="coreshop-margin-left-15 coreshop-margin-right-15 coreshop-margin-top-15 coreshop-margin-bottom-15" v-if="coreshopdata.parameters.lookTitle == 'true'">
|
<view class="coreshop-margin-left-15 coreshop-margin-right-15 coreshop-margin-top-15 coreshop-margin-bottom-15" v-if="coreshopdata.parameters.lookTitle == 'true'">
|
||||||
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != ''" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
|
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != ''" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<block v-if="count">
|
<block v-if="count">
|
||||||
<swiper :class="coreshopdata.parameters.column==3?'swiper3':coreshopdata.parameters.column==2?'swiper2':''" @change="change">
|
<swiper :class="coreshopdata.parameters.column==3?'swiper3':coreshopdata.parameters.column==2?'swiper2':''" @change="change">
|
||||||
<swiper-item v-for="no of pageCount" :key="no">
|
<swiper-item v-for="no of pageCount" :key="no">
|
||||||
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left">
|
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left" :data-id="no">
|
||||||
<u-grid-item v-for="(item, index) in coreshopdata.parameters.list" v-if="index >=coreshopdata.parameters.column*no && index <coreshopdata.parameters.column*(no+1)" :key="index" @click="goGoodsDetail(item.id)">
|
<u-grid-item v-for="(item, index) in coreshopdata.parameters.list" v-if="index >=coreshopdata.parameters.column*no && index <coreshopdata.parameters.column*(no+1)" :key="index" @click="goGoodsDetail(item.id)">
|
||||||
<view class="good_box">
|
<view class="good_box">
|
||||||
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopdata.parameters.column==3?'104px':coreshopdata.parameters.column==2?'164px':'104px'" radius="10">
|
<u-image :src="item.image" :index="item.id" mode="widthFit" width="100%" :height="coreshopdata.parameters.column==3?'104px':coreshopdata.parameters.column==2?'164px':'104px'" radius="10">
|
||||||
@@ -129,6 +129,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
current: 0,
|
current: 0,
|
||||||
|
pageCount: [],
|
||||||
|
count: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -149,24 +151,21 @@
|
|||||||
required: true,
|
required: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
pageCount() {
|
|
||||||
var count = this.coreshopdata.parameters.list.length / this.coreshopdata.parameters.column;
|
|
||||||
if (this.coreshopdata.parameters.column * count < this.coreshopdata.parameters.list.length) {
|
|
||||||
count = count + 1;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
},
|
|
||||||
count() {
|
|
||||||
return (this.coreshopdata.parameters.list.length > 0)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
change(e) {
|
change(e) {
|
||||||
this.current = e.detail.current;
|
this.current = e.detail.current;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.count = this.coreshopdata.parameters.list.length > 0;
|
||||||
|
var page = Number(this.coreshopdata.parameters.list.length / this.coreshopdata.parameters.column).toFixed(0);
|
||||||
|
if (this.coreshopdata.parameters.column * page < this.coreshopdata.parameters.list.length) {
|
||||||
|
page = Number(page) + 1;
|
||||||
|
}
|
||||||
|
for (var i = 0; i < page; i++) {
|
||||||
|
this.pageCount.push(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
<view @click="taped(child)">
|
<view @click="taped(child)">
|
||||||
<image class="ad-img" :src="child.image" mode="widthFix"></image>
|
<image class="ad-img" :src="child.image" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="imgup-btn" v-if="item.buttonText != ''" @click="showSliderInfo(child.linkType, child.linkValue)">
|
<view class="imgup-btn" v-if="child.buttonText != ''" @click="showSliderInfo(child.linkType, child.linkValue)">
|
||||||
<button class="coreshop-btn" :style="{background:item.buttonColor,color:item.textColor}">{{item.buttonText}}</button>
|
<button class="coreshop-btn" :style="{background:child.buttonColor,color:child.textColor}">{{child.buttonText}}</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user