|
@@ -31,13 +31,15 @@
|
|
|
<view class="fs-24 fw-400 fc-9 mb-20 text-overflow-ellipsis-one">
|
|
<view class="fs-24 fw-400 fc-9 mb-20 text-overflow-ellipsis-one">
|
|
|
公告:{{shopsInfo.notice}}
|
|
公告:{{shopsInfo.notice}}
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="flex-wrap-wrap">
|
|
|
|
|
|
|
+ <view class="flex-wrap-wrap" v-if="couponData.length>0">
|
|
|
<view class="info-box-quan-list" v-for="(item,i) in couponData" :key="i" @click="openCoupon">
|
|
<view class="info-box-quan-list" v-for="(item,i) in couponData" :key="i" @click="openCoupon">
|
|
|
- <image src="@/static/img/takeout/quan-bg.png" mode=""></image>
|
|
|
|
|
- <view class="quan-list-1 fw-b fs-32 fc-f">
|
|
|
|
|
- <span class="fw-b fs-20 fc-f">¥</span>{{item.money}}
|
|
|
|
|
|
|
+ <view class="" v-if="i<=2">
|
|
|
|
|
+ <image src="@/static/img/takeout/quan-bg.png" mode=""></image>
|
|
|
|
|
+ <view class="quan-list-1 fw-b fs-32 fc-f">
|
|
|
|
|
+ <span class="fw-b fs-20 fc-f">¥</span>{{item.money}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="quan-list-2 fw-400 fs-24 fc-f">领</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="quan-list-2 fw-400 fs-24 fc-f">领</view>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -57,7 +59,8 @@
|
|
|
|
|
|
|
|
<view class="common-view-css bgc-f" style="overflow: hidden;">
|
|
<view class="common-view-css bgc-f" style="overflow: hidden;">
|
|
|
<Menu style="height: 100%;" v-if="shopType === 1"></Menu>
|
|
<Menu style="height: 100%;" v-if="shopType === 1"></Menu>
|
|
|
- <Evaluate style="height: 100%;" :shopId='shop_id' :shopScore='shopsInfo.shop_score' v-else-if="shopType === 2"></Evaluate>
|
|
|
|
|
|
|
+ <Evaluate style="height: 100%;" :shopId='shop_id' :shopScore='shopsInfo.shop_score'
|
|
|
|
|
+ v-else-if="shopType === 2"></Evaluate>
|
|
|
<ShopInfo style="height: 100%;" :shopId='shop_id' v-else-if="shopType === 3"></ShopInfo>
|
|
<ShopInfo style="height: 100%;" :shopId='shop_id' v-else-if="shopType === 3"></ShopInfo>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -142,25 +145,33 @@
|
|
|
<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
|
|
<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="scroll-view-css">
|
|
<view class="scroll-view-css">
|
|
|
- <view class="item-box display-flex mb-20" v-for="(item,index) in 10" :key="index">
|
|
|
|
|
|
|
+ <view v-if="couponData<= 0" class="blank-text fs-32 fc-6 text-align-center">
|
|
|
|
|
+ 暂无优惠券
|
|
|
|
|
+ </view>
|
|
|
|
|
+<!-- <EnBlank :customSrc='true' v-if="couponData<= 0">
|
|
|
|
|
+ <template v-slot:blankImg>
|
|
|
|
|
+ <image class="black-img" src="@/static/img/common/no-order.png" mode=""></image>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </EnBlank> -->
|
|
|
|
|
+ <view class="item-box display-flex mb-20" v-for="(item,index) in couponData" :key="index">
|
|
|
<view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
|
|
<view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
|
|
|
<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
|
|
<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
|
|
|
- 优惠券名称优惠券名称优惠券名称优惠券名称优
|
|
|
|
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="fs-24 fc-6">
|
|
<view class="fs-24 fc-6">
|
|
|
- 有效时间:2024.05.08-2024.05.24
|
|
|
|
|
|
|
+ 有效时间:{{item.time_type_str}}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item-hr"></view>
|
|
<view class="item-hr"></view>
|
|
|
<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
|
|
<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
|
|
|
<view class="align-items-center">
|
|
<view class="align-items-center">
|
|
|
<view class="fs-30 fw-600 fc-FB3D03">¥</view>
|
|
<view class="fs-30 fw-600 fc-FB3D03">¥</view>
|
|
|
- <view class="fs-48 fw-600 fc-FB3D03">10</view>
|
|
|
|
|
|
|
+ <view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="fs-24 mb-18 fc-6">
|
|
<view class="fs-24 mb-18 fc-6">
|
|
|
- 满90元可用
|
|
|
|
|
|
|
+ 满{{item.full_money}}可用
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="but-box fs-28 fc-f">
|
|
|
|
|
|
|
+ <view class="but-box fs-28 fc-f" @click="receiveCode(item)">
|
|
|
立即领取
|
|
立即领取
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ball"></view>
|
|
<view class="ball"></view>
|
|
@@ -178,6 +189,10 @@
|
|
|
import Evaluate from './shop-mod/evaluate.vue';
|
|
import Evaluate from './shop-mod/evaluate.vue';
|
|
|
import ShopInfo from './shop-mod/info.vue';
|
|
import ShopInfo from './shop-mod/info.vue';
|
|
|
import tools from "@/service/tools";
|
|
import tools from "@/service/tools";
|
|
|
|
|
+ import EnBlank from "@/components/en-utils/en-blank/en-blank";
|
|
|
|
|
+ import {
|
|
|
|
|
+ receiveCoupon
|
|
|
|
|
+ } from "@/api/coupon.js"
|
|
|
import {
|
|
import {
|
|
|
shopInfo,
|
|
shopInfo,
|
|
|
shopCoupon
|
|
shopCoupon
|
|
@@ -186,7 +201,8 @@
|
|
|
components: {
|
|
components: {
|
|
|
Menu,
|
|
Menu,
|
|
|
Evaluate,
|
|
Evaluate,
|
|
|
- ShopInfo
|
|
|
|
|
|
|
+ ShopInfo,
|
|
|
|
|
+ EnBlank
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -215,10 +231,21 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.getDomH();
|
|
|
|
|
|
|
+ // this.getDomH();
|
|
|
this.shopCoupon()
|
|
this.shopCoupon()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ receiveCode(item) {
|
|
|
|
|
+ receiveCoupon({grant_id: item.grant_id,coupon_id: item.coupon_id}).then((res) => {
|
|
|
|
|
+ if(res.code == 1) {
|
|
|
|
|
+ tools.success(res.msg)
|
|
|
|
|
+ this.couponData = []
|
|
|
|
|
+ this.shopCoupon()
|
|
|
|
|
+ }else {
|
|
|
|
|
+ tools.error(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
toBack() {
|
|
toBack() {
|
|
|
tools.leftClick()
|
|
tools.leftClick()
|
|
|
},
|
|
},
|
|
@@ -280,7 +307,13 @@
|
|
|
shop_id: this.shop_id
|
|
shop_id: this.shop_id
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code == 1) {
|
|
if (res.code == 1) {
|
|
|
- this.couponData = res.data
|
|
|
|
|
|
|
+ if(res.data.length>0) {
|
|
|
|
|
+ this.domHeigjt = 224
|
|
|
|
|
+ this.couponData = res.data
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.domHeigjt = 156
|
|
|
|
|
+ console.log(this.domHeigjt, '1111111111111111111');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -289,6 +322,9 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
|
+ .blank-text{
|
|
|
|
|
+ line-height: 32vh;
|
|
|
|
|
+ }
|
|
|
.pop-coupon {
|
|
.pop-coupon {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 42vh;
|
|
height: 42vh;
|
|
@@ -327,7 +363,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-left {
|
|
.item-left {
|
|
|
- width: 200rpx;
|
|
|
|
|
|
|
+ width: 220rpx;
|
|
|
height: auto;
|
|
height: auto;
|
|
|
padding: 20rpx 24rpx;
|
|
padding: 20rpx 24rpx;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
@@ -469,7 +505,7 @@
|
|
|
top: -50rpx;
|
|
top: -50rpx;
|
|
|
left: 24rpx;
|
|
left: 24rpx;
|
|
|
width: 702rpx;
|
|
width: 702rpx;
|
|
|
- min-height: 258rpx;
|
|
|
|
|
|
|
+ // min-height: 156rpx;
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
|
|
|
|
|
|