Task:3744 【新需求】礼品卡图片自定义
This commit is contained in:
@@ -55,4 +55,12 @@ export function getGiftCardSendOrderAmount(key, data) {
|
||||
*/
|
||||
export function getGiftCardResend(data) {
|
||||
return request.post("/giftCard/makeAgain", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取背景图
|
||||
* @param {*} data
|
||||
*/
|
||||
export function getGiftCardSendBackground(data) {
|
||||
return request.get("giftCard/giftCardBackgroundImage", data);
|
||||
}
|
||||
@@ -66,7 +66,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="introduce bold">{{ storeInfo.storeName }}</view>
|
||||
<view v-if="storeInfo.isGiftCard === 1" class="v12-primary v12-white-text v12-px-2 v12-py-1 v12-mt-2 v12-radius-20 v12-font-bold v12-justify-between v12-align-center">
|
||||
<!-- :style="giftBg ? `background: url('${giftBg}') no-repeat center/cover` : ''" -->
|
||||
<view v-if="storeInfo.isGiftCard === 1"
|
||||
class=" v12-white-text v12-px-2 v12-py-1 v12-mt-2 v12-radius-20 v12-font-bold v12-justify-between v12-align-center gift-wrap"
|
||||
:style="giftBg ? 'background: url(' + giftBg + ') no-repeat center/cover' : ''"
|
||||
:class="giftBg ? '' : 'v12-primary'"
|
||||
>
|
||||
<view class="v12-font-28 v12-align-center" style="height: 74rpx">
|
||||
<image class="gift-img" :src="webUrl + '/orderIcon/gift.png'" mode="widthFix" ></image>
|
||||
支持礼包赠送
|
||||
@@ -551,7 +556,7 @@ import {
|
||||
removeProduct
|
||||
} from '@/api/favorite'
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
import {getGiftCardSendBackground} from "@/api/gift"
|
||||
export default {
|
||||
name: 'GoodsCon',
|
||||
components: {
|
||||
@@ -568,6 +573,7 @@ export default {
|
||||
data: function () {
|
||||
return {
|
||||
isGift: false,
|
||||
giftBg: '',
|
||||
// 商品信息是否展开
|
||||
isProductInfoExpand: true,
|
||||
shareInfoStatus: false,
|
||||
@@ -768,6 +774,11 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.getMapData()
|
||||
getGiftCardSendBackground().then(res => {
|
||||
if (res.status === 200) {
|
||||
this.giftBg = res.data || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
posterImageStatus(status) {
|
||||
@@ -2161,4 +2172,12 @@ export default {
|
||||
height: 34rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.gift-wrap{
|
||||
position: relative;
|
||||
}
|
||||
.gift-bg{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user