comment 8.1

This commit is contained in:
2020-08-01 16:36:48 +08:00
parent 865e2a741a
commit 854976c8f0
18 changed files with 356 additions and 120 deletions

View File

@@ -45,7 +45,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">
@@ -87,12 +89,14 @@
seckillTime: {}, // 秒杀时间
// couponGroupList: [], // 优惠券拼团分类
pinTuanPush: {}, // 拼团推荐
activityInfo: {},
areaList: [], // 位置信息
}
},
onLoad() {
this.getShopTopList();
this.getLocation(); // 获取定位
this.getStoreActivity();
// this.area = uni.getStorageSync("address") || "请选择";
},
onShow() {
@@ -195,6 +199,25 @@
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>
@@ -291,12 +314,14 @@
}
}
.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 {