adv 7.30
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
|
||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
||||
<view class="list">
|
||||
<view>
|
||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
||||
@@ -36,7 +36,7 @@
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||
<view class="box">
|
||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code"></u-swiper>
|
||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||
<view class="list">
|
||||
<view>
|
||||
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
||||
@@ -283,6 +283,28 @@
|
||||
url: '/pageB/follow/index'
|
||||
});
|
||||
},
|
||||
clickFImage(index) {
|
||||
const item = this.indexImageSwiper[index];
|
||||
console.log(item);
|
||||
this.activityLink({ type: item.url_type, id: item.info_id });
|
||||
},
|
||||
clickSImage(index) {
|
||||
const item = this.zhiboImageSwiper[index];
|
||||
console.log(item);
|
||||
this.activityLink({ type: item.url_type, id: item.info_id });
|
||||
},
|
||||
activityLink({ type, id }) {
|
||||
if(type == 0) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
|
||||
let params = { id: id };
|
||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
if(type == 1) Object.assign(params, { type: 1 });
|
||||
this.$u.route({
|
||||
url: url,
|
||||
params: params
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -241,6 +241,12 @@ export default {
|
||||
}
|
||||
}
|
||||
.mine-container {
|
||||
@mixin image-size($image-width, $image-height) {
|
||||
> image {
|
||||
width: $image-width !important;
|
||||
height: $image-height !important;
|
||||
}
|
||||
}
|
||||
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
|
||||
box-sizing: border-box;
|
||||
width: 690rpx;
|
||||
@@ -306,9 +312,24 @@ export default {
|
||||
}
|
||||
.content {
|
||||
justify-content: space-between;
|
||||
> view {
|
||||
text-align: center;
|
||||
};
|
||||
> view:nth-child(1){
|
||||
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||
}
|
||||
> view:nth-child(2){
|
||||
@include image-size($image-width: 39rpx, $image-height: 33rpx);
|
||||
}
|
||||
> view:nth-child(3){
|
||||
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||
}
|
||||
> view:nth-child(4){
|
||||
@include image-size($image-width: 40rpx, $image-height: 35rpx);
|
||||
}
|
||||
> view:nth-child(5){
|
||||
@include image-size($image-width: 37rpx, $image-height: 37rpx);
|
||||
}
|
||||
> view:nth-child(6){
|
||||
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
.tool {
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||
<!-- 拼团列表 -->
|
||||
<group></group>
|
||||
<image class="lingquan"></image>
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<youhq></youhq>
|
||||
<list ref="recommendGoods"></list>
|
||||
<view class="cart" @click="toCartPage">
|
||||
@@ -89,6 +91,7 @@ export default {
|
||||
seckillTime: {}, // 秒杀时间
|
||||
// couponGroupList: [], // 优惠券拼团分类
|
||||
pinTuanPush: {}, // 拼团推荐
|
||||
activityInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -98,6 +101,7 @@ export default {
|
||||
this.getRecommendedSpike();
|
||||
this.getSpikeList();
|
||||
this.getPinTuanPush();
|
||||
this.getStoreActivity();
|
||||
},
|
||||
methods: {
|
||||
sousuo() {
|
||||
@@ -170,6 +174,25 @@ export default {
|
||||
url: '/pageC/classify/index'
|
||||
});
|
||||
},
|
||||
getStoreActivity() {
|
||||
this.$u.api.getStoreActivity().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.activityInfo = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
activityLink({ type, id }) {
|
||||
if(type == 0 || type == 2) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||
let params = { id: id };
|
||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
if(type == 1) Object.assign(params, { type: 1 });
|
||||
this.$u.route({
|
||||
url: url,
|
||||
params: params
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -251,13 +274,15 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.lingquan {
|
||||
width: 750rpx;
|
||||
height: 177rpx;
|
||||
margin-left: -33rpx;
|
||||
margin-top: 29rpx;
|
||||
background-color: #ececec;
|
||||
}
|
||||
.activity-view {
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
.lingquan {
|
||||
background-color: #ececec;
|
||||
width: 688rpx;
|
||||
height: 138rpx;
|
||||
}
|
||||
}
|
||||
.cart {
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user