7.15
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<indexad style="width:690rpx"></indexad>
|
||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
|
||||
<view class="list">
|
||||
<view >
|
||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item" @getArticlelist="getArticlelist"></videoItem>
|
||||
@@ -35,7 +36,7 @@
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<indexad style="width:690rpx"></indexad>
|
||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code"></u-swiper>
|
||||
<view class="list">
|
||||
<view >
|
||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
||||
@@ -185,6 +186,8 @@ export default {
|
||||
page: 0, // 0即第一页
|
||||
articleList: [],
|
||||
recommendList: [], // 推荐达人
|
||||
indexImageSwiper: [],
|
||||
zhiboImageSwiper: [],
|
||||
}
|
||||
},
|
||||
components:{
|
||||
@@ -196,8 +199,24 @@ export default {
|
||||
onShow(){
|
||||
this.getArticlelist();
|
||||
this.getRecommendList();
|
||||
this.getSwiper();
|
||||
this.getZhiBoSwiper();
|
||||
},
|
||||
methods:{
|
||||
getSwiper() {
|
||||
this.$u.api.getIndexSwiper().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.indexImageSwiper = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
getZhiBoSwiper() {
|
||||
this.$u.api.getZhiBoSwiper().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.zhiboImageSwiper = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
dianji(a){
|
||||
// console.log(a)
|
||||
if(typeof a == "object"){
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
||||
</view>
|
||||
<view class="hr" style="margin-top:80rpx"></view>
|
||||
<recommend></recommend>
|
||||
<view class="hr" style="margin-top:40rpx"></view>
|
||||
<seckill></seckill>
|
||||
<view class="hr" style="margin-top:40rpx"></view>
|
||||
<recommend></recommend>
|
||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||
<view class="hr" style="margin-top:40rpx"></view>
|
||||
<seckill v-if="spikeList.length"></seckill>
|
||||
<view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
|
||||
<!-- <recommend></recommend> -->
|
||||
<!-- <view class="hr" style="margin-top:40rpx"></view> -->
|
||||
<group></group>
|
||||
<image class="lingquan"></image>
|
||||
<youhq></youhq>
|
||||
@@ -85,13 +85,20 @@ export default {
|
||||
list:[],
|
||||
goodsClassify: [], // 商品分类
|
||||
classifyList: [],
|
||||
goodsList: []
|
||||
goodsList: [],
|
||||
recommendedSpike: {}, // 秒杀推荐
|
||||
spikeList: [], // 全部秒杀列表
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getShopTopList();
|
||||
this.getGoodsRecommend();
|
||||
},
|
||||
onShow() {
|
||||
// console.log(this.$store.shop.state.count);
|
||||
this.getRecommendedSpike();
|
||||
this.getSpikeList();
|
||||
},
|
||||
methods: {
|
||||
sousuo(){
|
||||
// console.log(123)
|
||||
@@ -115,6 +122,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getRecommendedSpike() {
|
||||
this.$u.api.recommendedSpike().then(res => {
|
||||
if(res.errCode == 0) this.recommendedSpike = res.data;
|
||||
console.log(this.recommendedSpike);
|
||||
})
|
||||
},
|
||||
// 全部秒杀
|
||||
getSpikeList() {
|
||||
this.$u.api.getSpikeList({ page: 0 }).then(res => {
|
||||
if(res.errCode == 0) this.spikeList = res.data;
|
||||
})
|
||||
},
|
||||
getGoodsRecommend() {
|
||||
this.$u.api.getGoodsRecommend({
|
||||
page: 1,
|
||||
|
||||
Reference in New Issue
Block a user