Feat:选择礼包封面按钮背景图根据后台配置获取

This commit is contained in:
linxi
2025-11-22 14:37:58 +08:00
parent 096b0cef0d
commit cdf1f24b74
2 changed files with 24 additions and 18 deletions
+11
View File
@@ -101,3 +101,14 @@ export function receiveSojoumGroupBuyGift(params) {
login: true
})
}
/**
* 旅居礼品卡送礼入口轮播图
* @param {*} params
* @returns
*/
export function fetchSojoumGroupBuyGiftCarousel(params) {
return request.get("/travel/giftCardTravelBanner",params, {
login: true
})
}
+13 -18
View File
@@ -1,23 +1,8 @@
<template>
<view class="gift-page" v-if="(goodsInfo.productInfo && goodsInfo.productInfo.storeName) || isGroupBuy">
<view class="top-card" v-if="!isPayOk ">
<view class="v12-justify-between v12-pa-2">
<view>
<view></view>
<view class="v12-font-28 v12-secondary-dark-text v12-d-flex">
<u-icon :name="webUrl + '/icon/gift-primary.png'"></u-icon>
<!-- 送礼寄语 -->
</view>
</view>
<view class="v12-primary-text v12-font-26 v12-d-flex v12-align-center">
<image class="custom-cover" :src="webUrl + '/icon/custom.png'" mode="heightFix" lazy-load="false">
</image>
<view @click="handleShowCover">{{ cover }}封面</view>
<view>
<u-icon name="arrow-right" color="#c52733"></u-icon>
</view>
</view>
<view class="v12-justify-between" @click="handleShowCover">
<image class="popCover" :src="popupCover" mode="aspectFit|aspectFill|widthFix" lazy-load="false"></image>
</view>
</view>
<view class="gift-good-card">
@@ -200,7 +185,8 @@ import {
getGiftCardSendOrderAmount,
getGiftCardResend,
createGroupBuyGift,
createSojoumGroupBuyGift
createSojoumGroupBuyGift,
fetchSojoumGroupBuyGiftCarousel
} from '@/api/gift'
import { weappPay } from "@/libs/wechat";
import {mapGetters} from "vuex";
@@ -256,6 +242,7 @@ export default {
showPopup: false,
blindImage: '',
isGroupBuy: false,
popupCover: ''
}
},
watch: {
@@ -275,6 +262,9 @@ export default {
} else {
this.getGift()
}
fetchSojoumGroupBuyGiftCarousel().then(res => {
this.popupCover = res.data[0]
})
},
computed: {
...mapGetters(["userInfo"]),
@@ -734,4 +724,9 @@ export default {
background: #fff;
border-radius: 30rpx;
}
.popCover{
width: 100%;
height: 280rpx;
border-radius: 16rpx;
}
</style>