This commit is contained in:
2020-07-30 20:33:16 +08:00
parent 04adc72d92
commit 6d00107944
17 changed files with 241 additions and 124 deletions

View File

@@ -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;