苹果上线
This commit is contained in:
@@ -87,7 +87,24 @@
|
||||
<view class="price_box"> </view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template v-if="canGetCouponList.length > 0">
|
||||
<u-divider
|
||||
text="购买本商品赠送如下优惠券"
|
||||
:hairline="true"
|
||||
textColor="#333"
|
||||
lineColor="#b0b0b0"
|
||||
></u-divider>
|
||||
<view class="tanchu">
|
||||
<view class="listBox">
|
||||
<common-coupon
|
||||
:List="canGetCouponList"
|
||||
:source="'goodsDetail'"
|
||||
itemClass="itemCouponClass"
|
||||
>
|
||||
</common-coupon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template>
|
||||
<common-sticky label="title" :itemStyle="`width:${
|
||||
cateList.length == 2 ? '50' : '33'
|
||||
@@ -222,7 +239,7 @@
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item `">
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||
<image :src="slotProps.row.images||slotProps.row.image" mode="aspectFit" class="goods_image"></image>
|
||||
</view>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
@@ -479,7 +496,7 @@
|
||||
// info: 2
|
||||
// }
|
||||
],
|
||||
|
||||
canGetCouponList: [], // 可获得优惠券列表
|
||||
swiperList: [],
|
||||
goodsList: [],
|
||||
options: {},
|
||||
@@ -637,6 +654,31 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
async getCanGetCouponList() {
|
||||
await this.$http
|
||||
.request({
|
||||
url: "common/coupon/couponToProductList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 100,
|
||||
productId: this.curriculumData.productId,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code != 0) return this.$commonJS.showToast(res.errMsg);
|
||||
console.log("res优惠券", res);
|
||||
this.canGetCouponList = res.couponToShopproductPage.records;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
});
|
||||
},
|
||||
closeShowInfo() {
|
||||
this.showInfo = false;
|
||||
},
|
||||
@@ -852,6 +894,7 @@
|
||||
.then(async (res) => {
|
||||
that.selectGoodsData = res.data.GLProducts[0];
|
||||
that.curriculumData = res.data.detail;
|
||||
// await this.getCanGetCouponList();
|
||||
that.booksList = res.data.books ? res.data.books : [];
|
||||
that.coursesList = res.data.courses ? res.data.courses : [];
|
||||
that.goodsList = res.data.GLProducts;
|
||||
|
||||
Reference in New Issue
Block a user