mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-21 01:45:53 +08:00
积分商品,以及完善砍价商品
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
|
||||
<!-- 购买 -->
|
||||
|
||||
<popupGoods :addr="addr" ref="popupGoods" :buyMask="maskFlag" @closeBuy="closePopupBuy" :goodsDetail="bargainDetail" :goodsSpec="goodsSpec" v-if="bargainDetail.id "
|
||||
<popupGoods ref="popupGoods" :buyMask="maskFlag" @closeBuy="closePopupBuy" :goodsDetail="bargainDetail" :goodsSpec="goodsSpec" v-if="bargainDetail.id "
|
||||
@handleClickSku="getGoodsDetail" />
|
||||
|
||||
<!-- 产品详情 -->
|
||||
@@ -218,22 +218,11 @@ export default {
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
});
|
||||
|
||||
this.$refs.popupGoods.buy({
|
||||
skuId: this.bargainDetail.id,
|
||||
num: 1,
|
||||
cartType: "KANJIA",
|
||||
});
|
||||
// getGoods(this.bargainDetail.id, this.bargainDetail.goodsId).then(
|
||||
// (response) => {
|
||||
// this.goodsDetail = response.data.result.data;
|
||||
// this.selectedGoods = response.data.result.data;
|
||||
// this.goodsSpec = response.data.result.specs;
|
||||
// uni.hideLoading();
|
||||
|
||||
// // this.maskFlag = true;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
|
||||
// 初始化商品以及砍价活动
|
||||
@@ -257,7 +246,7 @@ export default {
|
||||
let res = await getBargainActivity(this.params);
|
||||
// 判断当前是否是第一次进入,如果是第一次进入默认砍一刀
|
||||
res.data.success
|
||||
? res.data.result
|
||||
? res.data.result.launch
|
||||
? (this.activityData = res.data.result)
|
||||
: this.openActivity()
|
||||
: "";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<u-navbar back-icon-color="#fff" :background="background" :border-bottom="false" title=""></u-navbar>
|
||||
<u-navbar back-icon-color="#fff" :background="background" :border-bottom="false" title=""></u-navbar>
|
||||
<div class="wrapper">
|
||||
<!-- 砍价列表 -->
|
||||
<div class="box">
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
background: {
|
||||
backgroundColor: 'transparent',
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
params: {
|
||||
promotionStatus: "START", //开始/上架
|
||||
@@ -45,6 +45,12 @@ export default {
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.params.pageNumber = 1;
|
||||
this.bargainList = [];
|
||||
this.init();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.params.pageNumber++;
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
@@ -54,7 +60,7 @@ export default {
|
||||
async init() {
|
||||
let res = await getBargainList(this.params); //砍价列表
|
||||
if (res.data.success) {
|
||||
this.bargainList = res.data.result.records;
|
||||
this.bargainList.push(...res.data.result.records);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -68,12 +74,11 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: $light-color !important;
|
||||
page {
|
||||
background-color: $light-color !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.wrapper {
|
||||
background: url("../static/Bargaining.png");
|
||||
background-repeat: no-repeat;
|
||||
|
||||
Reference in New Issue
Block a user